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
It's not a bug in mdbook per se. Mdbook wraps the text of every heading in a link to itself, so the resulting HTML looks like <h2 id="xyz"><a class="heading" href="#xyz">Heading text</a></h2>. The pagetoc is generated by iterating over all anchors with the heading class and using their .text attribute.
However, when you manually add a link to a heading, you
prevent pagetoc from seeing the text, since now you have a nested link and pagetoc would need to look at .children instead of .text, and
generate invalid HTML. Nested a tags are prohibited by the standard. That's the main problem IMO, and I'd refrain from adding links to section headings.
I'm guessing this is related to #658 and is a bug on the side of
mdbook
. Still, I wanted to at least record it.The text was updated successfully, but these errors were encountered: