You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I have some pages where I want to have a lower max level for the ToC content than on the other pages.
For that, it would be great to have some way of applying the max-level (and potent future settings) on a per-toc basis, that can override the global setting.
My idea is to use a comment like the following <!-- toc:max-level = 2 -->.
This could be parse fairly easy, as long as the setting value is limited to a single-line statement.
I saw in the readme that the basic toc marker can be replaced with a multi-line element. That would be very tricky to handle as we have to match the cmark-pulldown events, as well as matching substrings in case they don't fully match.
Maybe it's okay to start with a restriction to single-line elements first, and if anyone needs a multi-line version it could be added later?
The text was updated successfully, but these errors were encountered:
dnaka91
changed the title
Support for _per-toc_ settings
Support for per-toc settings
Aug 7, 2023
Currently, I have some pages where I want to have a lower max level for the ToC content than on the other pages.
For that, it would be great to have some way of applying the
max-level
(and potent future settings) on a per-toc basis, that can override the global setting.My idea is to use a comment like the following
<!-- toc:max-level = 2 -->
.This could be parse fairly easy, as long as the setting value is limited to a single-line statement.
I saw in the readme that the basic toc marker can be replaced with a multi-line element. That would be very tricky to handle as we have to match the cmark-pulldown events, as well as matching substrings in case they don't fully match.
Maybe it's okay to start with a restriction to single-line elements first, and if anyone needs a multi-line version it could be added later?
The text was updated successfully, but these errors were encountered: