renettarenula / anchorific.js

⚓️ Generates anchored headings and nested anchored-based navigations based on header tags
MIT License
138 stars 30 forks source link

Quick fix for issue #13 #14

Closed fnicollet closed 1 week ago

fnicollet commented 9 years ago

Quick fix for issue https://github.com/renettarenula/anchorific.js/issues/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