Open dchambers opened 9 years ago
Your idea is very interesting, maybe the plugin can be modified to create the anchor calling an user defined callback receiving as arguments level, section and element so callback can decide what to do, a simply call to encodeURIComponent
or any other custom behavior
If an anchor isn't explicitly supplied then one is generated, but based on the headings' current position within the document, rather than the name of the heading. I've worked around this issue locally by replacing:
with:
but obviously any proper solution would need to handle the case where the same heading name had been used multiple times (e.g. for a sub-heading), in which case the positional information could be included again to disambiguate.