You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ToC is rendered with local markdown links. At the moment, the anchors (hash in the URL) are derived from the title, which creates an issue when similar titles are used:
The problem is that we can not be sure that the user's Markdown rendered will de-duplicate links similarly - by adding -<num> -- as the Github Markdown renderer does. This is ok for the first iteration.
Proper fix
Since generic Markdown schema does not allow custom anchors on titles, another way to enable uniqueness here is to reformat the duplicate titles as HTML tags:
instead of
## Steps
create
<h2id="steps-1">Steps</h2>
This complicates the logic—the ToC plugin would need to reprocess already produced Markdown strings to rewrite the headers. This is a good second iteration
ToC is rendered with local markdown links. At the moment, the anchors (hash in the URL) are derived from the title, which creates an issue when similar titles are used:
The anchors should be suffixed with
-<number>
if there if there are duplicates, for example:Uniqueness
First iteration
The problem is that we can not be sure that the user's Markdown rendered will de-duplicate links similarly - by adding
-<num>
-- as the Github Markdown renderer does. This is ok for the first iteration.Proper fix
Since generic Markdown schema does not allow custom anchors on titles, another way to enable uniqueness here is to reformat the duplicate titles as HTML tags:
instead of
## Steps
create
This complicates the logic—the ToC plugin would need to reprocess already produced Markdown strings to rewrite the headers. This is a good second iteration
References
The text was updated successfully, but these errors were encountered: