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

Strikethrough does not work midword like on GitHub #532

Closed
not-my-profile opened this issue May 31, 2021 · 3 comments · Fixed by #648
Closed

Strikethrough does not work midword like on GitHub #532

not-my-profile opened this issue May 31, 2021 · 3 comments · Fixed by #648
Labels

Comments

@not-my-profile
Copy link

GitHub renders ~~foo~~bar as foobar and foo~~bar~~ as foobar.

pulldown-cmark however doesn't recognize both strikethroughs:

$ echo '~~foo~~bar' | cargo run  -- -S
<p>~~foo~~bar</p>
$ echo 'foo~~bar~~' | cargo run  -- -S
<p>foo~~bar~~</p>

Unfortunately the GFM spec doesn't say much about strikethroughs (see github/cmark-gfm#74), but we could of course still be consistent with the established GitHub rendering.

@marcusklaas
Copy link
Collaborator

Hi! Thanks for reporting this, and my apologies for only getting back to you now.

I think we certainly would like to be consistent with GitHub where we can, but to me it's not entirely clear whether strikethrough behavior is merely underspecified, or that the GitHub implementation of the spec is incorrect, especially since the behavior is not consistent with that of other text modifiers.

As long as we are consistent with the latest spec, I am very open to persuasion on this issue.

@Martin1887 Martin1887 added the bug label May 7, 2023
@SilverBut
Copy link

Considering the strikethrough discussion in the standard have not made much process for almost 10 years and the GFM is surely popular, maybe we should consider following GFM by making strikethrough works in midword.

Also, for CJK and some other languages, words are not split by space. Instead, characters in those languages will group into words by their meaning. Japanese wikipedia gave a good example:

image

(Translate: Texts are partially removed and new text inserted like this)

Thus, making strikethrough works in midword is useful for CJK users, and not affecting other people meanwhile.

cc @marcusklaas if you are still following this issue

@Martin1887
Copy link
Collaborator

Good point, I will work on this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants