Repository navigation
🐛 fix(markdown): preserve deep emphasis across blocks - #1660
Conversation
Nested HTML emphasis spanning paragraph boundaries can lose formatting when the Markdown output is read back as HTML. Close and reopen deep markers at each block so the parser sees a complete emphasis run in each paragraph.
Merging this PR will improve performance by 0.26%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Converting HTML with deeply nested emphasis around multiple paragraphs could change which text is emphasized when the Markdown was read back. This keeps the formatting attached to each paragraph.
The Markdown serializer now closes deep raw HTML emphasis at a block boundary and reopens it when the next block has content. One open-marker count tracks both raw HTML and Markdown markers.