markdown-toc
markdown-toc copied to clipboard
"#" in code block bug
content like this
1 # title 1
2
3 <!-- ToC start -->
4 <!-- ToC end -->
5
6 # code
7
8 ```go
9 code here
10 # some comment
11 ```
12
13 # next title
14
output is
$ markdown-toc foo.md
<!-- ToC start -->
# Table of Contents
1. [title 1](#title-1)
1. [code](#code)
1. [some comment](#some-comment)
1. [next title](#next-title)
<!-- ToC end -->
The " # comment " been treated as a title.
same issue, but I think current features are enough, as a walkaround, I move '#' comments out of code