Don't fold over horizontal rule line break

Heading fold should stop at horizontal rule

Currently heading fold will fold until the next heading with the same level.
However when a page has a horizontal rule ---, it’s a clear indication that this is a logical break between text, therefore fold should stop at this line. Not every time I use a --- the following section need to have a header with the same level as the previous headers.

# H1
Fold with H1
## H2
Fold with H1
## Another H2
This should not be folded with H1 above.

Alternative: Consider horizontal rule also as a fold marker, with priority bigger than H1 header. This way one can fold the entire --- section regardless of what header is used inside.


+1 I use the horizontal rule as a divider between major sections in the doc in exactly this way. It provides a visual distinction especially when looking at a long list of collapsed H1s or H2s etc.


+1 for this. The divider should be visible at all times. It tells a visual thinker like me where the first point ends and where the next starts. Please!!!

Aye. A plus one from me, too. =)


As a workaround, I’m using:


(line breaks for visual distinction;
empty level one header for fold break;
horizontal rule)

+1 for this

This is one of my few complaints with Obsidian. Is there a potential work around with plugins or CSS that somebody more advanced than I could share?

Found an easy workaround, though I’m sure this could be accomplished automatically with CSS or scripts.

Templater note:

# <br>

Create a hotkey for the Templater note (in my case: CTRL+L).

1 Like