Description
A soft line break is dropped when the following line starts with emphasized text. This joins words that should be separated by a space in the rendered ADF.
Reproduction
markdownToAdf("**Type:** chore\n**Estimated scope:** S (1-2 files)")
The resulting paragraph contains " chore" followed immediately by the strong-marked "Estimated scope:", so Jira renders choreEstimated scope:.
Plain soft breaks are converted to spaces correctly (a\nb becomes a b), while explicit Markdown hard breaks still produce hardBreak nodes.
Cause
getSafeText removes a newline at the end of an inline text token before replacing remaining newlines with spaces. Marked places the soft break in a trailing text token when the next token is emphasis, so that newline is removed rather than normalized.
Description
A soft line break is dropped when the following line starts with emphasized text. This joins words that should be separated by a space in the rendered ADF.
Reproduction
The resulting paragraph contains
" chore"followed immediately by the strong-marked"Estimated scope:", so Jira renderschoreEstimated scope:.Plain soft breaks are converted to spaces correctly (
a\nbbecomesa b), while explicit Markdown hard breaks still producehardBreaknodes.Cause
getSafeTextremoves a newline at the end of an inline text token before replacing remaining newlines with spaces. Marked places the soft break in a trailing text token when the next token is emphasis, so that newline is removed rather than normalized.