Skip to content

Conversation

@miketheman
Copy link
Contributor

According to the cmark-gfm spec, using 3 or more tildes should not become a strikethrough.
Refs: https://github.github.com/gfm/#example-493

However, using this kind of string on GitHub.com today adds the del attributes.

This test will fail, but cmark-gfm behaves differently.
Which one is correct?

According to the `cmark-gfm` spec, using 3 or more tildes should not
become a strikethrough.
Refs: https://github.github.com/gfm/#example-493

However, using this kind of string on GitHub.com today adds the `del`
attributes.

Which one is correct?

Signed-off-by: Mike Fiedler <[email protected]>
@kivikakk
Copy link
Owner

Correct according to what, I suppose? 😅 As you've noticed, the spec text isn't very clear on the edge cases (which is my fault!! sorry!).

The last relevant strikethrough change on cmark-gfm (producing the results you see on GitHub) are here: https://github.com/github/cmark-gfm/pull/120/files

I'd be inclined to bring Comrak into line, given that and the discussion in github/cmark-gfm#118.

Are you interested in contributing the fix as well? If so, I'll leave it to you. If not, I'm happy to pick it up.

@miketheman
Copy link
Contributor Author

@kivikakk Thanks for the pointers, I've added a commit with what I believe is a fix. Not super familiar with Rust conventions, so let me know if it needs any updates.

@kivikakk
Copy link
Owner

Thank you so much! LGTM :)

@kivikakk kivikakk merged commit 8391420 into kivikakk:main Oct 21, 2025
22 checks passed
@miketheman miketheman deleted the miketheman/strikethrough-inconsistency branch October 21, 2025 01:57
@miketheman
Copy link
Contributor Author

Excellent!
Will this make it into the upcoming 0.45 release?

@kivikakk
Copy link
Owner

Yes, it will!

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