Skip to content

Duplicate headings = duplicate IDs #58

Open
@infinitnet

Description

@infinitnet

The title sort of explains the issue already. If we have an outline like:

H2: PHP
H3: Examples
H2: JavaScript
H3: Examples

then the two H3s would have the same ID and effectively break the functionality of the TOC. This is something I'd consider a critical issue that actually blocks me from using the plugin because having duplicate headings is a relatively common situation and not a rare exception. The obvious solution would be to append -N if there are duplicate headings, eg. #example-1 and #example-2 in the case of above outline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions