Repository navigation
fix(web): parse bold text around CJK punctuation #8971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ import { defaultUrlTransform } from "react-markdown"; | |
| import rehypeRaw from "rehype-raw"; | ||
| import rehypeSanitize, { defaultSchema } from "rehype-sanitize"; | ||
| import remarkBreaks from "remark-breaks"; | ||
| import remarkCjkFriendly from "remark-cjk-friendly"; | ||
| import remarkGfm from "remark-gfm"; | ||
| import { remarkGithubAlerts } from "../markdown-github-alerts"; | ||
| import { | ||
|
|
@@ -374,6 +375,7 @@ const CHAT_MARKDOWN_REMARK_PLUGINS = [ | |
| remarkGithubAlerts, | ||
| remarkNormalizeListItemIndentation, | ||
| remarkCodexDirectives, | ||
| remarkCjkFriendly, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When these strings are displayed in the mobile chat, this change only affects the web/desktop ReactMarkdown pipeline. I checked the iOS path: AGENTS.md reference: AGENTS.md:L67-L70 Useful? React with 👍 / 👎. |
||
| remarkPreserveCodeMeta, | ||
| remarkNormalizeLinksAndTagInlineCode, | ||
| ] satisfies NonNullable<ReactMarkdownOptions["remarkPlugins"]>; | ||
|
|
@@ -383,6 +385,7 @@ const CHAT_MARKDOWN_REMARK_PLUGINS_WITH_BREAKS = [ | |
| remarkGithubAlerts, | ||
| remarkNormalizeListItemIndentation, | ||
| remarkCodexDirectives, | ||
| remarkCjkFriendly, | ||
| remarkBreaks, | ||
| remarkPreserveCodeMeta, | ||
| remarkNormalizeLinksAndTagInlineCode, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium
components/ChatMarkdown.tsx:378CJK-adjacent strikethrough such as
~~中文。~~中文still uses GFM's non-CJK delimiter rules and can render the delimiters literally. Adding onlyremarkCjkFriendlydoes not install the requiredremark-cjk-friendly-gfm-strikethroughcompanion whileremarkGfmremains enabled; add that plugin to the remark pipeline.🤖 Copy this AI Prompt to have your agent fix this: