Skip to content

Keep consecutive hard line breaks in MarkdownRenderer - #487

Open
AdzerKI wants to merge 1 commit into
commonmark:mainfrom
AdzerKI:fix-consecutive-hard-line-breaks
Open

AdzerKI wants to merge 1 commit into
commonmark:mainfrom
AdzerKI:fix-consecutive-hard-line-breaks

Conversation

@AdzerKI

@AdzerKI AdzerKI commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #486

When a hard line break would start a line (right after another break, or at the start of a paragraph), CoreMarkdownNodeRenderer now writes it as a backslash instead of two spaces. Every other break keeps the two-space form, so existing output doesn't change.

The new round-trip cases in MarkdownRendererTest.testHardLineBreaks fail on main and pass with this change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MarkdownRenderer: consecutive hard line breaks turn into a paragraph break

1 participant