Skip to content

Conversation

@Exception0x0194
Copy link

@Exception0x0194 Exception0x0194 commented Feb 6, 2025

Description

During the Markdown rendering process, content wrapped with two ~ characters is styled with a strikethrough - however, in LLM outputs (especially in role-playing scenarios), there are often many instances of ~ used as tonal markers. This results in cases where these tonal markers fail to display correctly, and instead, the text in between is rendered with a strikethrough. Additionally, when the LLM intends to strike through a paragraph, it mostly uses ~~ rather than a single ~. Therefore, we can remove the rendering rule for single ~ characters.

To address this, the remarkGfm plugin has been configured with the {singleTilde: false} parameter, ensuring that content wrapped with a single ~ is no longer styled with a strikethrough (while content wrapped with ~~ continues to render correctly).

Additional Notes

  • Content wrapped with a single ~ is no longer styled with a strikethrough:
    喵呜~♡这就为您呈上暗夜女王的馈赠呦~ → 喵呜~♡这就为您呈上暗夜女王的馈赠呦~
  • Content wrapped with ~~ is still rendered with a strikethrough:
    喵呜~~♡这就为您呈上暗夜女王的馈赠呦~~ → 喵呜♡这就为您呈上暗夜女王的馈赠呦

Screenshots

Before:
图片

After:
图片

Contributor Agreement

By submitting this Pull Request, I confirm that I have read and agree to the following terms:

  • I agree to contribute all code submitted in this PR to the open-source community edition licensed under GPLv3 and the proprietary official edition without compensation.
  • I grant the official edition development team the rights to freely use, modify, and distribute this code, including for commercial purposes.
  • I confirm that this code is my original work, or I have obtained the appropriate authorization from the copyright holder to submit this code under these terms.
  • I understand that the submitted code will be publicly released under the GPLv3 license, and may also be used in the proprietary official edition.

Please check the box below to confirm:

[√] I have read and agree with the above statement.

@Exception0x0194 Exception0x0194 changed the title Remove single tilde strikethrough feat: disable single tilde strikethrough Feb 7, 2025
@XiaoBuHaly
Copy link

这会导致所有一个波浪符号的删除线渲染错误,用户通常不会主动要求LLM在正常输出中使用何种形式创建删除线,因此仅仅禁用它是片面的。

建议:

  1. (治标不治本)要求LLM使用全角括号
  2. 新增对话设置中调整md渲染的开关,单独调整每个对话窗口,将设置中原有的md开关调整为对话默认设置

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.

2 participants