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

TOC doesn’t understand between comment in code and h1 header

Open BuonOmo opened this issue 8 years ago • 2 comments

If you have a piece of code, for install ruby or sh like this:

# my function is nice
def my_function ()
    "I’m nice"
end

TOC will interpret 'my function is nice' as a h1 header.

BuonOmo avatar Aug 09 '16 18:08 BuonOmo

@BuonOmo Yea I have the same problem. As a workaound you can add a space before your comment.. not sexy at all but it does the job :-)

B-Galati avatar Aug 21 '16 20:08 B-Galati

Nice hack! But I was more looking of a way to fix it :stuck_out_tongue:

BuonOmo avatar Aug 23 '16 20:08 BuonOmo