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
{{ message }}
Repository navigation
Less/greater than signs in headings appear as </> in TOC #931
That's an mkdocs site with the readthedocs theme. It's using git master HEAD of mkdocs and markdown. The issue was caused by 74c0166. I haven't tested this using just markdown so it might be related to mkdocs.
Ah, I missed that that was a code span. It would appear that code spans were not being considered in this comment. We do need the smart escape after all.
Okay, I guess my results were different as I'm using pymdownx.inlinehilite. It uses the htmlstash instead of AtomicString. I guess there is a difference in how those get handled...
I guess htmlstash must work while AtomicString does not due to the fact that the htmlstash placeholders don't get cleaned up until after the toc is generated. I imagine it just duplicates the placeholder, and the placeholders get replaced with the content post toc.
So yeah, we generally need a solution when handling AtomicStrings. I assume we can just detect AtomicString types and not escape them? I don't think we specifically need a smart escape.
This prevents us from getting weird ids such as lttestgt Which we previously got from `<text>`. And it returns a string that we can handle sanely. It just unescapes Atomic strings with html.unescape which uses html5 rules for entities (py34+).
Activity
facelessuser commentedon Apr 5, 2020
What version of Markdown are you using? I'm not seeing this in the current version.
waylan commentedon Apr 5, 2020
I just tested the
readthedocstheme with the latest on master and do not see the issue.Note that in the picture you can see the Markdown text, the TOC and the main body. All appear correct.
p-ouellette commentedon Apr 5, 2020
Reproduced using just markdown 3.2.1:
With markdown 3.2 the above command outputs:
waylan commentedon Apr 5, 2020
Ah, I missed that that was a code span. It would appear that code spans were not being considered in this comment. We do need the smart escape after all.
Sent with GitHawk
facelessuser commentedon Apr 5, 2020
Okay, I guess my results were different as I'm using
pymdownx.inlinehilite. It uses thehtmlstashinstead ofAtomicString. I guess there is a difference in how those get handled...facelessuser commentedon Apr 5, 2020
I guess
htmlstashmust work whileAtomicStringdoes not due to the fact that thehtmlstashplaceholders don't get cleaned up until after the toc is generated. I imagine it just duplicates the placeholder, and the placeholders get replaced with the content post toc.So yeah, we generally need a solution when handling AtomicStrings. I assume we can just detect AtomicString types and not escape them? I don't think we specifically need a smart escape.
facelessuser commentedon Apr 5, 2020
I'll take a stab at it.
facelessuser commentedon Apr 5, 2020
Yeah, I think all we really need is something like this:
This prevents us from getting weird ids such as
lttestgtWhich we previously got from`<text>`. And it returns a string that we can handle sanely. It just unescapes Atomic strings withhtml.unescapewhich uses html5 rules for entities (py34+).TOC fix for AtomicString handling (#934)