Repository navigation
[PR] fix: keep Markdown inline code literal in handoff rendering - #6696
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
Conversation
This was referenced Nov 20, 2026
Closed
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.
Problem
Handoff Markdown and the web panel currently interpret markup inside inline code a second time. The renderer wraps a backtick span in
<code>and then runs the image, emphasis, and link rules over its contents. Code examples can turn into active images/links or lose literal text instead of showing their source.Change
Encode
*,[and]inside the already HTML-escaped code span as numeric character references. Later Markdown rules cannot consume those delimiters, while the browser displays the original characters. The existing code-span recognition is retained. The shared factory remains self-contained for its minified browser embedding; no dependency or configuration surface is added.Formatting surrounding code remains active, and code within a Markdown link label still renders inside that link.
Verification
9495c764d36909eec263f404d4802d68b608f23f, two controls pass. The controls preserve ordinary code and HTML escaping. Negative cases cover literal emphasis, image/link examples, rejected URL examples without text loss, code inside link labels, surrounding emphasis, and the minified/detached factory used by the browser.npm run typecheck,npm run build, andgit diff --checkpass.Historical deduplication checked the complete Afloat16 production-patch index (no prior renderer changes) and related all-state results. The #5482 and #5901 head implementations still feed code contents into later replacements. #2270 edits the separate static website path, not this shared renderer.
Closes #6695.