Skip to content

fix: require double tildes for strikethrough formatting - #18

Merged
AaronCQL merged 2 commits into
mainfrom
fix/strikethrough-double-tilde
Apr 25, 2026
Merged

fix: require double tildes for strikethrough formatting#18
AaronCQL merged 2 commits into
mainfrom
fix/strikethrough-double-tilde

Conversation

@AaronCQL

Copy link
Copy Markdown
Owner

Summary

  • goldmark's default GFM strikethrough parser accepts both ~text~ and ~~text~~, causing false positives with single tildes
  • Replaces the bundled extension.GFM with individual extensions plus a custom strikethrough parser that requires minimum 2 tildes
  • Adds test case confirming single tildes pass through as literal text

Test plan

  • go build ./... passes
  • go test ./... passes
  • ~~text~~ still renders as strikethrough
  • ~text~ now passes through unchanged

goldmark's default GFM strikethrough parser accepts both single (~) and
double (~~) tildes. Single tildes caused false positives. Replaces the
bundled GFM extension with individual extensions plus a custom parser
that requires minimum 2 tildes.
@AaronCQL
AaronCQL merged commit f0a64e0 into main Apr 25, 2026
1 check passed
@AaronCQL
AaronCQL deleted the fix/strikethrough-double-tilde branch April 25, 2026 02:01
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