Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Preserve Blank Lines

Yves LefebvreYves Lefebvre16 downloads

Preserves consecutive blank lines in reading mode, matching the source 1:1.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

An Obsidian plugin that preserves consecutive blank lines in reading mode, matching the source 1:1.

By default, Obsidian's Markdown renderer collapses any number of consecutive blank lines into a single paragraph break in reading mode. This plugin restores the extra blanks so that the visual spacing matches what you typed.

Why this exists

I am migrating my notes from Zim desktop wiki to Obsidian as it has better support for code blocks and mobile devices. However, one thing that was bugging me was that some of my notes, once transferred to Obsidian, looked "cramped". I found out that Zim preserves blank lines.

I was not able to find any simple solution for Obsidian : What I found on forums was to add "/" slash character on blank line you want to preserve, or some "Em Space" (invisible character) that made editing confusing because it is difficult to see. Or some html <br> tag.

Other people say if you don't like Markdown, then use another tool than Obsidian. I see Obsidian already has some specific Obsidian-only Markdown syntax, so why not add an option in it to preserve space in reader mode? Personal notes aren't tech documentation. I want spacing the way other tools allow it.

Hence this plugin. Hope you find it useful!

Example

Source:

First paragraph.



Second paragraph after three blank lines.

Without the plugin, reading mode collapses this to a single paragraph break. With the plugin enabled, the three blank lines are preserved.

Install

Manual install

  1. Download main.js, manifest.json, and versions.json from the latest release.
  2. Place them in <your-vault>/.obsidian/plugins/preserve-blank-lines/.
  3. In Obsidian: Settings -> Community plugins, disable Restricted mode if needed, click the refresh icon, then enable Preserve Blank Lines.

From the community store

Not yet submitted. Once approved, it will be installable from Settings -> Community plugins -> Browse.

Customize spacing

Each preserved blank line is rendered as a <div class="preserve-blank-line">. Add a CSS snippet (Settings -> Appearance -> CSS snippets) to tweak height:

.preserve-blank-line {
  line-height: 1.5;
}

Known limitations

  • Skips nested contexts. Inside callouts, transclusions/embeds, and some other nested rendering contexts, Obsidian's MarkdownPostProcessorContext.getSectionInfo() returns null. Blocks in those contexts are silently passed through unchanged. See the API docs.

Build from source

Requires Node.js 18+ and npm.

git clone https://github.com/Ivanohe73/obsidian-preserve-blank-lines.git
cd obsidian-preserve-blank-lines
npm install
npm run dev    # watch mode for development
npm run build  # production bundle

The build outputs main.js in the project root.

License

MIT

88%
HealthExcellent
ReviewSatisfactory
About
Preserve consecutive blank lines in reading mode so visual spacing matches your source exactly. Render each preserved blank line as a stylable div (.preserve-blank-line) so you can adjust spacing with CSS.
FormattingCSS
Details
Current version
0.1.0
Last updated
2 days ago
Created
2 days ago
Updates
1 release
Downloads
16
Compatible with
Obsidian 1.0.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Yves LefebvreYves Lefebvreivanohe
GitHubivanohe73
  1. Community
  2. Plugins
  3. Formatting
  4. Preserve Blank Lines

Related plugins

Admonition

Admonition block-styled content.

Columns

Create columns in Markdown.

Highlightr

A minimal and aesthetically pleasing highlighting menu that makes color-coded highlighting much easier with a configurable assortment of highlight colors.

Hyphenation

Enable justified text and hyphenation.

Inline spoilers

Adds Discord-like syntax for inline spoilers in reader mode.

Style Settings

Adjust theme, plugin, and snippet CSS variables.

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

CSS Editor

Edit CSS snippet files.

Lapel

Show the heading levels in the gutter of the editor.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.