mdBook
mdBook copied to clipboard
Spacers in sidebar don't appear at correct level
For example, the spacer in SUMMARY.md is placed inside the subsection list, when it should be top-level:
Just noticed this. Still happening.
Copying my comment from #1730:
I suspect it would be around here, where it uses an <li>
for the spacer. Perhaps it could use a different tag, like <hr>
? However, this would need careful consideration of how it will change existing users, and whether or not it will affect their expected rendering.
It seems like the <li>
spacer is rendered as a child of the previous section (which also causes it to disappear when folding is enabled), so I think <hr>
would be bound by the .section
's padding-left
either way.
Maybe, a workaround could be to delay this call (and remove the continue
, since it seems to also break the next sections) to when current_level
is back to 1
(possibly here, but it might bug when this runs).
This would force it to render inside .chapter
and not inside li > .section
, which would also fix its indentation.
Fixed by #2364
Thanks! I'm not sure why it didn't auto-close.