Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix slugify: markdown header sections containing only special chars #1619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ghost wants to merge 1 commit into vuejs:master
base: master
Choose a base branch
Loading
from unknown repository
Open

fix slugify: markdown header sections containing only special chars #1619

ghost wants to merge 1 commit into vuejs:master from unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented May 24, 2019

Summary

Markdown header sections that contain only specials characters like <<, ->
or even ? (as used for function descriptions in the Gerbil Scheme Reference
Docs) end up empty, breaking scrolling, search and sidebar navigation.

Replacing the empty result with an underscore, similar to what happens with
numbers in the front position, fixes all of these problems.

To see the problem in action, go to https://cons.io/reference/actor.html#message-primitives
and scroll down. It will jump to the top of the page. Furthermore, clicking on links
these links in the sidebar does nothing, same thing with the search field in
the navigation bar.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome (latest stable)
  • Firefox (latest stable)
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Markdown header sections that contain only specials characters like `<<`, `->`
or even `?` (as used for function descriptions in the Gerbil Scheme Reference
Docs) end up empty, breaking scrolling, search and sidebar navigation.
Replacing the empty result with an underscore, similar to what happens with
numbers in the front position, fixes all of these problems.
Copy link
Collaborator

flozero commented Sep 5, 2019

Hello @DwDv thank's for your pr i know it's been a while a create the pr. Sorry for that.

It's look awesome your explanation. In the header you mean in ## ? right ?

Thank's a lot for your time ! 👍

@flozero flozero added topic: markdown Relates to VuePress markdown type: enhancement Request to enhance an existing feature labels Sep 5, 2019
@flozero flozero assigned ghost Sep 5, 2019
@flozero flozero added the version: 1.x Relates to version 1 of VuePress label Sep 5, 2019
Copy link
Author

ghost commented Sep 5, 2019
edited by ghost
Loading

Yes, exactly, @f3ltron, in our docs we have header sections like these: ### -&gt; and ### send.

These are representing functions within the our Scheme programming language dialect. While send is no problem at all, -> creates the following link: https://cons.io/reference/actor.html# that leads to page scrolling issues when js is enabled as well as the other problems described above.

Thanks a lot for looking into this!

Copy link
Collaborator

flozero commented Sep 5, 2019
edited
Loading

yeah i just look at every single one PR. It took time but the core team will try his best :).

Ok i see

Copy link
Collaborator

flozero commented Sep 5, 2019

Maybe we should add more test for it i will have a look as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

topic: markdown Relates to VuePress markdown type: enhancement Request to enhance an existing feature version: 1.x Relates to version 1 of VuePress

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /