Closed rhempel closed 9 years ago
I'll look into this.
I increasingly believe I was correct in my initial assertion that fenced code blocks were a bad idea, as they add a huge degree of uncertainty to what was mostly a fairly predictable format (Multi/Markdown) otherwise. But I conceded, and implemented them, and now have to deal with it, or remove them.... Live and learn...
:)
Having written a few parsers myself, but not a Markdown parser, I am in no position to argue for or against. That being said, I do use fenced code blocks all the time in my docs, so as a user I'd like them to stay. The issue (I think) is that the TOC parser does not understand that it should ignore anything in a fenced code block - but that's just a guess.
The problem is not that I don't understand where to fix the problem (I have a bit of experience with the code over the last 10 years, as you can imagine).
The problem is that fenced code blocks break many assumptions you can otherwise make about Markdown.
A fenced code block like this:
and the
{{TOC}}
feature (thanks!) don't play well together - they produce:The actual fenced code block is fine