jgallen23/toc

Inserting anchor element before headline breaks CSS "+" Selector

jdittrich opened this issue · 1 comments

Inserting the anchor element before headline introduces an additional element between different headlines and/or paragraphs and headlines which breaks CSS stylesheets using the "+" selector (Select consecutive elements).

Possible Solution: Could the anchor be appended to the headline itself? So instead of <span id="toc4"></span><h3>Options</h3> it would create a <h3>Options<span id="toc4"></span></h3>?

Ran into this issue myself. I'd suggest just putting the ID directly on the header element:

<h3  id="toc4">Options</h3>

Looks like with #60 already has this fix.