Open fredrik-bakke opened 3 weeks ago
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
.children
instead of .text
, anda
tags are prohibited by the standard. That's the main problem IMO, and I'd refrain from adding links to section headings.I see, thank you for clarifying! I'll leave this issue open until the problematic headers are fixed then.
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.