Repository navigation
fix(text-editor): allow inline code inside other marks in markdown - #4066
Merged
Merged
Conversation
kulmann
approved these changes
Oct 29, 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
Markdown files with inline code inside other marks, e.g.
**`Sharing`**or[`config.json`](url), could not be opened in the text editor. Tiptap'sCodemark excludes all other marks, but@tiptap/markdownparses these constructs into text carrying both, so the document failed the schema check.Changes:
MarkdownCodeextension that replaces StarterKit's code mark. It only excludes itself, so code can carry bold, italic, strike and links.**`foo`**instead of`**foo**`.appendTransaction) and once when the initial content is loaded, since that is parsed without a transaction. As a consequence, adjacent code spans with different marks, e.g.`a`**`b`**, load as`ab`.The root cause is upstream in tiptap, reported in ueberdosis/tiptap#8637 (related: ueberdosis/tiptap#8568, ueberdosis/tiptap#8569). This extension can be reduced or dropped once that is fixed.
Known limitations:
[`a`](https://x.y)[`b`](https://z.w)) are merged into a single code span and both links are dropped, so the URLs are lost on the next save.Related Issue
text-editor: inline code inside bold makes the whole file unopenable #4061