Hashes in code blocks interpreted as titles in ToC

For example, this kind of md, which is a fenced code block (/code, ``` ``) with a common sh comment in it (“#”):

# This is a comment in a BSD configuration file:
resolvconf=NO

Gets interpreted as a level 1 tile in the ToC:

For context, both “Networking” and “Firewall” are legit lvl1 titles.

May I be misusing the code block syntax perhaps? Code blocks made with 4 spaces (not fencing) don’t cause that issue in the ToC.

Thanks!

No, you’re doing it right. I just “simplified” the implementation of the TOC in v2, and it no longer takes into account fenced code blocks. So this is a bug. Could you create a github issue for this?

Sure, done :slight_smile:

1 Like