Repository navigation
Conversation
@tiptap/markdown's escapeMarkdownSyntax backslash-escapes every `_` character unconditionally when re-serializing an edited block. This turns any identifier containing underscores (e.g. `user_name_field`) into `user\_name\_field` on save, which then renders literally with visible backslashes. Patch @tiptap/markdown@3.31.3 (via pnpm patch) so an underscore is only escaped when it is NOT flanked by word characters on both sides, matching CommonMark's intraword-underscore-is-literal rule. Emphasis- style underscores (leading/trailing/whitespace-flanked) keep escaping exactly as before. Scope: this only fixes underscores. Backslash, backtick, asterisk, and brackets are unchanged. Tilde is also left unchanged: GFM strikethrough delimiters in the actual parser (marked) can pair up across arbitrary distance within a text run based on flanking rules, not just adjacent `~~`, so a safe per-character fix for tilde isn't possible without a full delimiter-matching pass - out of scope here. Fixes stablyai#22014 (partially; see scope note above).
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.
Same-repo PR to run full CI matrix on GitHub runners before the real PR (stablyai#22123).