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

Table of contents not generated correctly if level 1 or 2 headings not included

Open jkaving opened this issue 9 years ago • 0 comments

If only level 3 or lower headings are included (using the !heading marker), the table of contents will be indented too much in the generated Markdown and the resulting HTML will not be a list.

This source file:

# Title
## Section
### Heading !heading
#### Subheading 1 !heading
#### Subheading 2 !heading

will result in this table of contents:

␣␣␣␣* [Heading](#heading)
␣␣␣␣␣␣* [Subheading 1](#subheading-1)
␣␣␣␣␣␣* [Subheading 2](#subheading-2)

(with the spaces represented by ␣)

jkaving avatar Oct 26 '17 07:10 jkaving