Line separator between folded titles is not visible in preview mode

I would like to display a separator line between two foldable headings. Currently, the renderer regards the separator as being part of the first folded section so it is not displayed when the first section is folded.

Steps to reproduce

  1. Create two headings.
  2. Insert the markdown for a line separator between them
  3. Display in preview mode

Expected result

With the first heading unfolded the separator is displayed

When the first header is unfolded the separator should still be displayed.

Actual result

The separator is regarded as part of the first paragraph and is folded

Environment

  • Operating system: macOS Big Sur
  • Obsidian version: 0.11.13

Additional information

This is a feature request, not a bug report.

A debatable point but hey, it’s not really worth arguing about. Do you want me to resubmit it as a feature request?

I have found a work around of using a
before the markdown for the separator but that results in a new fold arrow being associated with the
which isn’t a problem but just looks a bit clumsy.

search/open a new feature request.

Yeap, this kinda bothers me as well. If I do remember right this is a markdown thing, not really an Obsidian thing.

I had the same doubt but in my case I wanted a space between headings, not a line break: How do I restart a paragraph? I wanna have line breaks between headings

In my case I ended up using $~$(an empty equation) or 
 and both codes render a line break on Obsidian, regardless of the theme, so I don’t have to mess with CSS.

But as you’d expect, these have no effect between headings:

## Heading1 

 
test 

 
## Heading2

Makes “test” a child of H1, as it will with a separator or other smaller headings.

It feels awkward to me not to have an option to have trailing content between headings of the same kind, but this doesn’t seem to bother many. Paired with the heading fold thing, it would make sense to me to have cosmetic separators (as your line separator) or even some text that shouldn’t get collapsed even when all headings are (a text block that behaves like top heading).

1 Like

@DeaconLight Thanks for the reply. Personally I believe it to be an Obsidian issue rather than markdown because it only happens when folding is enabled, which is purely an obsidian feature.

I totally agree with the last paragraph of your comment. If I raise a feature request then it may be best to do it for the more general case that you describe of ‘trailing content between headings of the same kind’ with my use case as an example. The current assumption that everything up to the next heading of the same kind should be foldable works in the majority of situations but is flawed. IMO an ‘end of paragraph’ code would permit us to have a non-foldable content block between heading blocks. It could be used for a line separator, advisories, warnings etc. that one wants displayed on a permanent (non-foldable) basis.

4 Likes