Skip to content

html: keep EastAsian soft breaks before inlines - #587

Open
team-humaki wants to merge 1 commit into
yuin:masterfrom
team-humaki:html-keep-softbreak-before-inlines
Open

team-humaki wants to merge 1 commit into
yuin:masterfrom
team-humaki:html-keep-softbreak-before-inlines

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #582.

WithEastAsianLineBreaks only looked at a KindText sibling. A soft break before a code span, link, or emphasis had no comparable rune, so the newline was never written and Latin words were joined (in + `file`infile).

Keep the break unless both sides are non-empty text runes that the strategy says to join.

Tests cover Latin text before a code span, link, and emphasis.

WithEastAsianLineBreaks only compared KindText siblings, so a break
before a code span, link, or emphasis was dropped and Latin words
were glued together.

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.

1 participant