Open malachid opened 7 months ago
Can you show a screenshot of that? And maybe share the HTML code it generates.
Sure:
<li><a href="#same--lfloorsqrt-pq-">Same ( \lfloor\sqrt pq )</a></li>
Looks like that's what we get from pulldown-cmark at the moment, so I might re-escape the data before outputting it.
upstream issue: https://github.com/pulldown-cmark/pulldown-cmark/issues/572
And it would require a bunch of work to make that possible in mdbook-toc.
If we "just" use the span of the header event we would get the original text instead of the unescaped one, but because headers can now include additional tag (# header {#additional .stuff}
) we would need to parse that out again. Which I don't want to, because that's half-way to a markdown parser again.
For now I don't have a solution.
When using Mathjax along with mdbook-toc, there is a discrepancy in how it is rendered.
Let's say you add a heading like:
The header will render properly using Mathjax. The TOC at the top of the page will show the raw text instead.