Vscode-markdown: [Feature Request] Option to not add the top level heading in table of contents

Created on 29 May 2019  ·  4Comments  ·  Source: yzhang-gh/vscode-markdown

The top level heading (aka # H1) has to be the first line in the file, so it is usually right above the table of contents, and there can be only one, there is no real need to have a link to it.

Would be nice to have an option to not add it in table of contents.

Question

Most helpful comment

This can be done with the <!-- omit in toc --> comment

omit heading

All 4 comments

See option markdown.extension.toc.plaintext

@yzhang-gh thanks.

The option markdown.extension.toc.plaintext allows to create a table of contents without links, including the top level heading.

What I wanted and I was suggesting, is to have the TOC without the top level heading, which should work both with that option enabled and disabled.

This can be done with the <!-- omit in toc --> comment

omit heading

You can also configure it in settings: "markdown.extension.toc.levels": "2..6"

Was this page helpful?
0 / 5 - 0 ratings