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

Skip first H1 headline is broken

Open ghost opened this issue 9 years ago • 4 comments

Generate TOC with the option firsth1:false outputs undefined. Btw, I would also suggest to use a more meaningful name like skipFirstHeadline

ghost avatar Dec 27 '15 22:12 ghost

Can you show me where that is documented? The option is firsth1 I believe. documented here

jonschlinkert avatar Dec 28 '15 00:12 jonschlinkert

You can also use options.filter to exclude headings.

jonschlinkert avatar Dec 28 '15 00:12 jonschlinkert

Yes. I did use firsth1 exactly as documented. The first Headline isn't displayed but undefined. From a quick look at the source it seems this option wasn't updated with code changes.

ghost avatar Dec 28 '15 10:12 ghost

ah, ok thanks so much for double-checking. looks like a bug

jonschlinkert avatar Dec 28 '15 11:12 jonschlinkert