Markdown Exports: blank lines around headings

Markdown requires that items such as headings, lists, etc. be separated by a blank line.

Panda’s markdown file does not have blank lines after such items, even though the note preview is stylized with separation that suggests otherwise (i.e. padding is added automatically between headings and whatever follows).

Note in Panda:
image

Same note, in a text editor:
image

There should be a blank line between Heading 1 and the list below it, as well as between A paragraph. and Heading 2.

Is this intentional? In order to have proper markdown formatting, do I need to manually add extra lines in Panda, so it looks like this?

image

To me, this feels like it would ruin the preview formatting that Panda does so well.

Actually it doesn’t, the CommonMark spec doesn’t require blank lines around headings.

That said, I too would prefer a blank line above headings in the raw Markdown, except where the line above a heading is another heading:

# Some title
## Subtitle
much much text

## Next subtitle
More text

Hello,

blank lines before/after headers are not required in Markdown and you’re free to follow the style you like more (with or without).

Panda typography was built around both possibilities: adding a bit of space if you don’t want a blank line after the header or just showing a blank line without the additional space.

There is no right or wrong here is just a matter of preferences :slight_smile:

Best.

1 Like

Interesting, I didn’t know that CommonMark allows both. Appreciate the reference!

If I understand correctly, the editor allows for an empty line to appear below a header, and in this case only the empty line should be visible, not the extra space.
From my experimentation with Panda and Bear 2, it doesn’t seems to work like that. Am I misunderstanding the feature?