Open
Description
When a page has duplicated heading text, they end up generating the same anchor link. This is confusing because if I share an anchor link to a section of a page, it end up somewhere unexpected.
There's a markdownlint rule to flag duplicate heading text, but I think a more bullet-proof solution would be to update the doc parser to handle duplicate heading text.
Similar to the approach that github.com takes, could we append -1
to the ID and increment from there when the same heading text is seen?
It looks like ID is being set here in MarkdownHeading.