Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Same headers with different cases don't generate unique links #93

Open
gmccullo opened this issue Oct 7, 2020 · 1 comment · May be fixed by #92
Open

Same headers with different cases don't generate unique links #93

gmccullo opened this issue Oct 7, 2020 · 1 comment · May be fixed by #92

Comments

@gmccullo
Copy link

gmccullo commented Oct 7, 2020

Here's a demo of the issue. Note that the 1st and 2nd items have the same (#value):

<!-- TOC -->

- [Item](#item)
- [item](#item)
- [item](#item-1)

<!-- /TOC -->

# Item

# item

# item

mcornella added a commit to mcornella/markdown-toc that referenced this issue Nov 2, 2020
This fixes the case where different titles get the same hash. In the old
version, the repetition number was tracked with the title; since they
didn't match, the repetition number wasn't incremented.

Now, the repetition number is tracked from the hash (#title), so they
get the correct repetition.

Fixes alanwalk#93
@mcornella mcornella linked a pull request Nov 2, 2020 that will close this issue
@mcornella
Copy link

Fixed in #92.

mcornella added a commit to mcornella/markdown-toc that referenced this issue Nov 2, 2020
This fixes the case where different titles get the same hash. In the old
version, the repetition number was tracked with the title; since they
didn't match, the repetition number wasn't incremented.

Now, the repetition number is tracked from the hash (#title), so they
get the correct repetition.

Fixes alanwalk#93
mcornella added a commit to mcornella/markdown-toc that referenced this issue Nov 2, 2020
This fixes the case where different titles get the same hash. In the old
version, the repetition number was tracked with the title; since they
didn't match, the repetition number wasn't incremented.

Now, the repetition number is tracked from the hash (#title), so they
get the correct repetition.

Fixes alanwalk#93
mcornella added a commit to mcornella/markdown-toc that referenced this issue Nov 2, 2020
This fixes the case where different titles get the same hash. In the old
version, the repetition number was tracked with the title; since they
didn't match, the repetition number wasn't incremented.

Now, the repetition number is tracked from the hash (#title), so they
get the correct repetition.

Fixes alanwalk#93
mcornella added a commit to mcornella/markdown-toc that referenced this issue Nov 2, 2020
This fixes the case where different titles get the same hash. In the old
version, the repetition number was tracked with the title; since they
didn't match, the repetition number wasn't incremented.

Now, the repetition number is tracked from the hash (#title), so they
get the correct repetition.

Fixes alanwalk#93
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants