markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Hash in code block used for TOC entry

Open andioz opened this issue 8 years ago • 1 comments

I have a text, where I use a code block for 'sh' to show a shell script. First line of the script is the typical Shebang line. This is used by markdown-toc to generate a wrong TOC line.

Can I escape the hash character in the code block or is there another workaround? In general I guess code blocks should be ignored.

andioz avatar Nov 07 '16 13:11 andioz

Hey, I think this has already been fixed, it's just the owner hasn't published the fixed version.

If you follow the instructions here -- clone this repo, install dependencies link to this repo -- and then try to generate TOC in a Markdown file with hashtag comments in a code block, the code block comments should be ignored completely.

chruxin avatar Jul 18 '17 03:07 chruxin