Skip to content

Soft line breaks before emphasis - #13

Open
waterson wants to merge 1 commit into
jamsinclair:mainfrom
waterson:fix/soft-line-break-before-emphasis
Open

Soft line breaks before emphasis#13
waterson wants to merge 1 commit into
jamsinclair:mainfrom
waterson:fix/soft-line-break-before-emphasis

Conversation

@waterson

Copy link
Copy Markdown

Marked stores a soft line break at the end of the preceding text token when the next line begins with inline formatting. Marklassian removed that terminal newline instead of normalizing it to a space, causing adjacent text to run together.

This PR preserves soft line breaks between inline nodes while retaining the existing behavior around standalone images and explicit hard breaks.

Closes #12.

Testing

npm run check, npm run build --workspace=lib, and npm test --workspace=lib pass; the regression test covers the reported strong-emphasis boundary.

@waterson
waterson marked this pull request as ready for review August 14, 2026 20:47
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.

Soft line break is dropped before emphasis

1 participant