Skip to content
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

feat: disable single tilde strikethrough #1856

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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.

1 participant