Skip to content

Conversation

@0xfullex
Copy link
Collaborator

fix: markdown not recognized ** as emphasis marks in CJK

  • 当**遇到中文某些符号时(中日韩三国语言),**将不被识别,这导致中文输出中,样式被破坏(见后面截图的例子)
  • 这是一个CommonMark已知的问题(issue),react-markdown也受到了影响。
  • 采用 remark-cjk-friendly 解决了该问题(解决后效果见截图)

下面是一个会引起渲染错误的markdown,注意本应该渲染加粗的是 “会引起” “已知问题” “识别不了”

这是一个**“会引起”**渲染错误的**“已知问题”**,当加重符号\*\*遇到某些中文标点时,可能就会出现**“识别不了”**的情况。就如这句话展现的一样。

解决前:
image

解决后:
image

@DeJeune DeJeune merged commit 7e67005 into CherryHQ:main Mar 29, 2025
1 check passed
@0xfullex 0xfullex deleted the fix/markdown-cjk-emphasis branch March 29, 2025 16:44
@tats-u
Copy link

tats-u commented Apr 7, 2025

May I introduce the above 2 screenshots in README in remark-cjk-friendly and https://github.com/tats-u/markdown-cjk-friendly or issues (in other repositories) introducing the plugin or the CommonMark extension that remark-cjk-friendly bases on? And how about adding remark-cjk-friendly-gfm-strikethrough, which covers the GFM strikethrough (~~)? (I know AIs seldom outputs containing it though)
Anyway thank you for adopting and trying my CommonMark extension and package.

@0xfullex
Copy link
Collaborator Author

0xfullex commented Apr 8, 2025

May I introduce the above 2 screenshots in README in remark-cjk-friendly and https://github.com/tats-u/markdown-cjk-friendly or issues (in other repositories) introducing the plugin or the CommonMark extension that remark-cjk-friendly bases on? And how about adding remark-cjk-friendly-gfm-strikethrough, which covers the GFM strikethrough (~~)? (I know AIs seldom outputs containing it though)我可以在 README 中介绍上面的 2 个截图吗?在 https://github.com/tats-u/markdown-cjk-friendly 或问题(在其他存储库中)介绍插件或 CommonMark 扩展 ,这是 ``Cjk 友好的基础?添加 remark-cjk-friendly-gfm-strikethrough 如何,它涵盖了 GFM 删除线(~~)?(我知道 AI 很少输出包含它) Anyway thank you for adopting and trying my CommonMark extension and package.无论如何,感谢您采用并尝试我的 CommonMark 扩展和包。

ok to use those screenshots. thanks for your extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants