-
Notifications
You must be signed in to change notification settings - Fork 30
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
If several "h" have the same content, the same id gets generated, which breaks scrollspy #13
Comments
Quick fix for issue renettarenula#13 An array of names is kept in memory. Unique slugs are generated by appending "_" because there might not be other ways to distinguish 2 content parts. Also had to invert the order of anchor and navigations so that the unique ids are set on the "h" titles before the navigations function is executed. This way, navigations is grabbing the newly generated ids Fabien
Why would you set the title to the same name in the first place? Wouldn't that be confusing to your users? Just sayin'. |
Hello, It happens in like h4 or different h1s. Say you describe different parts of the interface in h1 and both have a way to "Add a filter". Then your subsection will have the same names |
We manage a site for a health department. Headings do repeat. It's inescapable. |
Hello, |
Hello and thanks for this useful library,
I have an issue, in my page i have several h4 which have exactly the same title. Anchrofic generates the exact same slug and because of that, the spy option will open several nodes (set as active) at the same time, which is not what I intended
If would be nice if slugs could be unique within one page such as "some-id" and "some-id2" or something
Fabien
The text was updated successfully, but these errors were encountered: