-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unexpected table structure #14
Comments
Taking a better look at the example this seems to be expected behaviour as each My div
h1
h2
h3 Which should output the contents as I expect them, as So I think the issue instead is that somewhere along the line, rehype gets lost and adds all my headers as nested lists instead of combining my headers into one singular list. This might have something to do with the way |
Never mind. I was expecting the headers to be same-leveled, but of course I should have used
instead if I wanted it to behave like that... |
I'm wondering if I'm doing something wrong here. The output of
rehype-toc
seems to be structured in a weird way.Using
rehype-toc
, given the input.svx
file:I get the output:
To me, this html looks weird. Why does the output contain nested lists?
If, for example, I wanted to apply a border to a
li
, I could target it with.toc li
or.toc toc-item
, and set a border.But because each
li
includes the other levels (for some reason I don't understand?), the border would extend all the way down, causing unexpected effects:yields:
Similar issues occur when you try to make
ol
alist-decimal
:yields
As each ol just contains one item!
A structure like this would make more sense to me:
As you could target each level with the
nth child
selector.Have I done something weird with my config to cause this behaviour? Or is this expected behaviour? And if so, what is the reasoning to not just use the intrinsic capabilities of lists?
The text was updated successfully, but these errors were encountered: