Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hello - I'm writing an app that needs to interoperate with Obsidian's "Markdown" format, which means that this:

abc

def
ghi

needs to turn into this

<p>abc</p>
<p></p>
<p>def</p>
<p>ghi</p>

I've seen the discussion at https://github.com/orgs/syntax-tree/discussions/33 about why Markdown does not support this, unfortunately I am compelled to offer support for what Obsidian does. If anyone cares to help me on my way to perdition, I was wondering whether the following approach would work:

  1. When parsing Markdown, replace '\n\n' with '\n:::blank\n' or some other custom directive that I can turn into a blank paragraph in my app
  2. When producing Markdown, emit :::blank for empty paragraphs, and then replace :::blank with \n in the produced Markdown
You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

@lukasb
Comment options

Hmm, the Obsidian plugins I have seen don't mention this. Obsidian doesn't even mention support for blank paragraphs on their own page about "Obsidian-Flavored Markdown" - but their app does round-trip blank paragraphs successfully.

I probably should have posted this to the Remark repo, sorry about that.

@JounQin
Comment options

JounQin Apr 24, 2025
Collaborator

If it doesn't, you'll need to write your own plugin anyway. remark itself will never support this kind of non-spec-compliant features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.