Skip to content

[Bug] CRLF line endings cause extra vertical spacing/empty lines on Windows #1810

@ChenZhu-Xie

Description

@ChenZhu-Xie

Description

I encountered a rendering issue where pages saved with CRLF (Windows default) line endings display extra empty lines or excessive vertical margin between paragraphs.

bandicam.2026-02-02.15-32-45-627.mp4

related post: https://community.silverbullet.md/t/tree-view-plug-cause-config-double-line-spacing/3214?u=chenzhu-xie

Steps to Reproduce

  1. Run SilverBullet locally on Windows.
  2. Create or edit a markdown file (e.g., index.md).
  3. Ensure the file is saved with CRLF (\r\n) line endings.
  4. Open the page in the browser.

Expected Behavior

Paragraphs should have standard spacing, identical to how they render with LF line endings.

Actual Behavior

The parser seems to interpret the carriage return (\r) as an additional newline, resulting in double line breaks or extra <br> tags between paragraphs in the DOM?

Additional Context

  • Workaround: Changing the file encoding to LF (\n) immediately resolves the issue and restores normal spacing.
  • This issue does not occur on remote Linux deployments (which default to LF).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions