marksman
marksman copied to clipboard
Add table of contents configuration
i want it to ignore the h1
, or
i want it to ignore headings that are specially tagged/annotated with some non renderable syntax.
Hi @airtonix !
i want it to ignore the h1
This should be pretty straightforward.
specially tagged/annotated with some non renderable syntax
Could you give an example?
Some ideas:
Control exactly where to start from
# Title
<!-- toc:start from(#something) -->
- [Something](#something-1)
- [Something](#something-2)
- [Something](#something-3)
- [Darkside](#darkside)
<!-- toc:end -->
## Something
words words words
## Something
words words words
## Something
words words words
### Darkside
words words words
if we could support for custom heading ids:
# Title
<!-- toc:start from(#something-last) -->
- [Something](#something-last)
- [Darkside](#darkside)
<!-- toc:end -->
## Something
words words words
## Something
words words words
## Something {#something-last}
words words words
### Darkside
words words words
Vaguely specify tags to exclude
# Title
<!-- toc:start from(.h2) -->
- [Something](#something-1)
- [Something](#something-2)
- [Something](#something-last)
- [Darkside](#darkside)
<!-- toc:end -->
## Something
words words words
## Something
words words words
## Something {#something-last}
words words words
### Darkside
words words words
ability to ignore certain headind instances
# Title
<!-- toc:start from(.h2) ignore(#something-1) -->
- [Something](#something-2)
- [Something](#something-last)
- [Darkside](#darkside)
<!-- toc:end -->
## Something
words words words
## Something
words words words
## Something {#something-last}
words words words
### Darkside
words words words
or
# Title
## Intro
<!-- toc:start from(.h2) ignore(#something-unimportant, #intro) -->
- [Something](#something-1)
- [Something](#something-last)
- [Darkside](#darkside)
<!-- toc:end -->
## Something
words words words
## Something {#something-unimportant}
words words words
## Something {#something-last}
words words words
### Darkside
words words words
@airtonix I like that, thanks for writing it down!
I also support this. No need to reinvent a new syntax though, there are some editor plugins that do something very similar, one could maybe just copy their syntax?
I guess everyone has their own way.
https://github.com/yzhang-gh/vscode-markdown/blob/0b75960d5d27f9e7d20960290e03e7127223de42/README.md?plain=1#L62