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

"#" in code block bug

Open rvrosm opened this issue 7 years ago • 1 comments

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.

rvrosm avatar May 18 '18 12:05 rvrosm

same issue, but I think current features are enough, as a walkaround, I move '#' comments out of code

Soontao avatar Jun 15 '19 02:06 Soontao