-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong TOC level #323
Comments
This seems like a bug. I'll look into it. |
Or, at least, it is a bug that the link does not work. How should the TOC look like for this file?
|
I think it should look like if there was a hidden level-2 heading between One an Three, except that the hidden heading's TOC entry should also be hidden. |
I agree, it's more important for the link to work, that's the key point. |
Not fully sure what you mean. Do you mean something like this (which is what we get today)? *Contents*
* [One](#One)
* [Three](#One#Three)
* [Two](#One#Two)
* [Two three](#One#Two#Two three)
I think this is fixed now. Please update and test. |
I agree that it would be nice to avoid the extra indent if there are no middle sections (such as in your initial example). However, I don't see immediately a nice solution for implementing this that would not be quite "hacky". And so I'm wondering if it is worth the work to implement it. |
I mean this
|
That's the same as what I posted..? |
By the way, I pushed another fix that should ensure that the first entry of the TOC is also properly printed. |
Yours |
Ah; but I think |
I'm happy as long as the link works. I'll test your fix and report back. |
Cool! |
Looks good to me. Thank you! |
My pleasure, and thanks for raising the issue! |
Minimal working example
Description
In the minimal working example, pressing
\wf
should produce the following TOCbut instead it produces:
with the level-3 heading promoted to level 2. Consequently, following the link always jumps to the level 1 heading.
The point is that I would like to be able to jump to the level 3 heading from the generated TOC even if there is no intermediate level 2 heading in the markdown file.
The text was updated successfully, but these errors were encountered: