Repository navigation
fix(editor): keep markdown paragraph text from turning into block syntax - #3618
Merged
Merged
Conversation
2 tasks done
JammingBen
force-pushed
the
fix/tiptap-md-paragraphs
branch
from
October 8, 2026 12:11
de40e94 to
fe1e39b
Compare
JammingBen
marked this pull request as ready for review
October 8, 2026 12:20
AlexAndBear
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked on #3616.
Escape block syntax at the start of paragraph lines. Tiptap only escapes inline syntax, so paragraph text like "1. May", "- foo" or "# foo" is saved without its backslash and comes back as a list or heading on the next load. List markers (
-,+,1.,1), letter and roman markers likeA.orI.), ATX headings and setext underlines are escaped now.> [!NOTE]) and table cells stay unescaped.Drop the indentation of paragraph lines. Markdown ignores it, but marked keeps it in the text, so the editor shows the lines shifted to the right and saves the spaces back.
The escaping can be removed once ueberdosis/tiptap#8134 is fixed upstream (see FIXME in code).
Related Issue
How Has This Been Tested?
1. May, an ordered list on the next load1\. May- not a list, a bullet list\- not a list+ not a list, a bullet list, saved as- not a listnext time\+ not a list# not a heading, a heading\# not a headingA. Müller, a letter listA\. MüllerI. Introduction, a roman listI\. IntroductionTitle\n===, saved as the heading# Titlenext timeTitle\n\===1. onebecomes a list after the second save1\. one, the other lines stay as they are- a\n2. b\nDr. Smith, saved as- a\n\n2. b\n3. Smithnext time, "Dr" is lost- a\n2\. b\nDr\. Smith> \[!NOTE\], the alert becomes text> [!NOTE]a\n ba\nbbis dropped (with #3616: shown asband saved indented)bin the task item