How do I restart a paragraph? I wanna have line breaks between headings

I’m trying to put a line break between headings

If I have this structure:

# Hello
# Hello2
<br>
# Hello3

That br tag will be child of #Hello2 and I want it to be there even if the second heading is collapsed.

Is there any way to have a new paragraph/line break there or make that br work before heading 3?

Sorry if a dumb question

1 Like

The only way I can think of to do this, if I understand what you want correctly, might be to put an empty # between the two lines:

# Hello
# Hello2
#
# Hello3

I don’t have an answer to this specific question, but there may be other ways of solving your problem.

Can you provide a little more insight on the real-world use case for that? Maybe sample excerpt? Are there only headings with no text beneath them?

On a side note, I believe the Markdown spec doesn’t admit more than one H1 in a single document (at the top). Nothing terribly bad should happen, but some linters may complain.

I’d love to see this working but just tried here and nope. When rendered (at least in the theme I’m using) this does render as another paragraph and acts as parent for following # s

Can you provide a little more insight on the real-world use case for that?

It’s basically that. An index page with a few headings separating the content into collapsible headings (as they do collapse when rendered).

believe the Markdown spec doesn’t admit more than one H1 in a single document

Was not aware of that. I’ll try to use just H2 for these from today on. I kinda include lots of other notes into said index pages using
![[note.paragraph]]
And these are formatted using H3/H4s already, so I’ll have to update just those index notes to use H2s to embed these.

But anyway, my index notes are kinda like this:

## Abstract
This index is about X Y Z and blablabla
<br>
## Field breakdown
### Subfield1
[[Anote|This is about field 1 on blablabla]]
### Subfield2
### Subfield3
![[embedFromAnotherNote.Aparagraph]]
### Subfield4
<br><br> ==I'd love to have a line break here, that pushes the following headings down when rendered, but this <br> tag is child of ### Subfield4==

## Evernote embed iframe
## Notes

Merely cosmetic, but yea, what I’m looking for. Thanks

So what you actually really want, if I understand right, is not necessarily a line break but just some more space before a new heading?

If so, something like this could help:

.markdown-preview-view h2 {
    padding-top: 2em;
}
2 Likes

Yeah, this would be my approach too. It’s a matter of visualisation, neither content nor structure.

1 Like

Brilliant!! I’m sorry, I’m new to Obsidian and I’m still learning about it and kinda forget that I can hack a lot with CSS. In case anyone finds this thread looking for the same thing, the CSS to apply a margin to the second to last should be this:

.markdown-preview-view h2:nth-last-of-type(2) {
    padding-top: 2em;
}

Thanks everyone!!

1 Like