-
Couldn't load subscription status.
- Fork 4.7k
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
Conversation
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.
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 ! 👍
Yes, exactly, @f3ltron, in our docs we have header sections like these: ### -> 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!
yeah i just look at every single one PR. It took time but the core team will try his best :).
Ok i see
Maybe we should add more test for it i will have a look as soon as possible
Summary
Markdown header sections that contain only specials characters like
<<,->or even
?(as used for function descriptions in the Gerbil Scheme ReferenceDocs) 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)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx], where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
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: