-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Background
The table of contents generator does a decent job until it handles a Markdown file with duplicate titles. In that case, the titles' links all point to the same reference, whereas the links for first duplicate title on should have -1, -2, etc. appended to it to properly reference the correct title.
For instance, right now a Markdown file like this:
# Main title
${TOC}
## Subtitle
## Subtitle 2
### Subtitle
### Subtitle 2
#### Subtitle 3
#### Subtitle 2
would get a table of contents like this:
- [Subtitle](#subtitle)
- [Subtitle 2](#subtitle-2)
- [Subtitle](#subtitle)
- [Subtitle 2](#subtitle-2)
- [Subtitle 3](#subtitle-3)
- [Subtitle 2](#subtitle-2)
instead of this:
- [Subtitle](#subtitle)
- [Subtitle 2](#subtitle-2)
- [Subtitle](#subtitle-1)
- [Subtitle 2](#subtitle-2-1)
- [Subtitle 3](#subtitle-3)
- [Subtitle 2](#subtitle-2-2)
Definition of Done
- table of contents generator correctly creates links for duplicate titles
Metadata
Metadata
Assignees
Labels
No labels