Skip to content

Conversation

Crozzers
Copy link
Contributor

@Crozzers Crozzers commented Dec 3, 2023

This PR contains a fix for a bug that was introduced in #538, where duplicate entries could be added to the TOC when mixed headers were in use.

The issue was in the _header_id_exists, where I was attempting to check that a header ID already existed. The function only checked for the header ID in _count_from_header_id, which contained the base ID but not the suffixed ones (eg: abc-1).

This PR has fixed this by also checking in the TOC itself for any header IDs that match.

@nicholasserra nicholasserra merged commit 6d19f3f into trentm:master Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants