IdAttributePlugin: append unique number sequence to duplicate IDs
#4259
xplosionmind
started this conversation in
Enhancement Queue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
IdAttributePlugin(#3363) throws an error if a page ends up having duplicate heading IDs.As of right now, beyond changing the content of the headings themselves, the only option to avoid this error is to ignore it (adding the option
checkDuplicates: false).It would be absolutely fantastic if this plugin could append unique sequence of numbers after the nth duplicate heading, so that IDs would become unique.
For example, if I have the headings
<h3>Example heading</h3>and<h2>Example heading</h2>, the plugin would generate and ID normally for the first one that appears in the page,<h3 id='example-heading'>Example heading</h3>and it would add-1to the ID of the second heading:<h2 id='example-heading-1'>Example heading</h2>.Related to #3424 and #3560.
Beta Was this translation helpful? Give feedback.
All reactions