Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Fix bug 819912 - Duplicate heading IDs #2088

Merged
merged 1 commit into from
Mar 7, 2014
Merged

Fix bug 819912 - Duplicate heading IDs #2088

merged 1 commit into from
Mar 7, 2014

Conversation

mediocrity
Copy link
Contributor

https://bugzilla.mozilla.org/show_bug.cgi?id=819912
I stole the test @darkwing created for this bug. 👯

@lmorchard
Copy link
Contributor

Taking a peek... got side tracked, but tests pass. About to take a run through spot checking manually

@lmorchard
Copy link
Contributor

Okay, I think I found a problem not covered in the test. The ID injection clobbers manually assigned IDs. So, this:

<h2>Section</h2>
<p>This is a section</p>
<h2 id="manual_id">Section</h2>
<p>This is a section</p>
<h2>Section</h2>
<p>This is a section</p>

Becomes this:

<h2 id="Section">Section</h2>
<p>This is a section</p>
<h2 id="Section_2">Section</h2>
<p>This is a section</p>
<h2 id="Section_3">Section</h2>
<p>This is a section</p>

But, I suspect the code was already doing this before this PR. Going to poke a little more on master branch and probably just merge this & file an issue for follow up.

@lmorchard
Copy link
Contributor

Oh, I see what I did, because I wrote this code but apparently can't remember what I had for breakfast. IDs get clobbered, but name attribute can be used for a manual ID. Weird workaround, but not a new issue.

lmorchard added a commit that referenced this pull request Mar 7, 2014
Fix bug 819912 - Duplicate heading IDs
@lmorchard lmorchard merged commit b72e47b into mdn:master Mar 7, 2014
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 this pull request may close these issues.

2 participants