markdown-toc
markdown-toc copied to clipboard
markdown-toc doesn't ignore code blocks
In markdown, you use ``` to fence of code blocks:
import os
# imports os module
The # is a comment character in python, but is used for headings in markdown. TOC should ignore all characters in code block, since # is a common comment escape in several programming languages.
This is really a Problem for me... A bad Workaround is to set updateOnSave:0 and edit the TOC manually. After the next save the TOC is fixed.
Example for reproduction of the bug:
-
Heading 1
- Dings
- Sachen
-
Another Heading
- Example - ###################
- Example not Heading! # - ###################
Heading 1
Dings
Sachen
Another Heading
Example
#########################
# Example not Heading! #
#########################
Duplicate of #88 and #89 Check my comment under #88 ?
Same here. It makes it impossible to use now :(
@eclaassens I have resortet to pandoc - it produces beautiful documents for me. I can use CSS and even place the TOC after a title/header page by creating the document in a two step process.