Skip to content

Fix Markdown paste formatting inheritance - #3480

Merged
Julia Roldi (juliaroldi) merged 3 commits into
masterfrom
u/juliaroldi/markdown-merge
Oct 26, 2026
Merged

Julia Roldi (juliaroldi) merged 3 commits into
masterfrom
u/juliaroldi/markdown-merge

Conversation

@juliaroldi

@juliaroldi Julia Roldi (juliaroldi) commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix Markdown paste conversion to preserve heading tags and sizes, bold, italic, and strikethrough while inheriting target formatting such as font family and text color. Add an opt-in preserveParagraphDecorator merge option and include target paragraph decorator and segment formatting in mergeModel's inherited defaults. Enable Markdown paste auto-conversion in the demo and add regression coverage for all six heading levels, rendered heading sizes and colors, emphasis, and existing content.

PasteMarkdownRooster

How to test

  1. Run yarn eslint, yarn test:fast, and yarn b. All passed locally, including 6,523 tests. For focused coverage, run yarn test:fast --testPathPattern="mergeModelTest|MarkdownPastePluginTest".
  2. In the demo, set the insertion-point font to Arial, 20px, and red, then paste plain-text Markdown containing # Heading, ## Subheading, and plain **bold** *italic* ~~strike~~. Auto-conversion is enabled by default. Before this fix, target formatting could override Markdown emphasis and heading sizes; after this fix, headings retain their tags and relative sizes, Markdown emphasis is preserved, and the content inherits the target font family and color.
  3. Repeat with target strikethrough enabled. Plain text should inherit strikethrough, and Markdown bold and italic should remain intact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ab825f99-539f-445e-a76f-2b56116ab33e
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-26 22:02 UTC

@juliaroldi
Julia Roldi (juliaroldi) merged commit 523bf94 into master Oct 26, 2026
8 checks passed
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.

2 participants