commonmark-java icon indicating copy to clipboard operation
commonmark-java copied to clipboard

Single-tilde strikethrough not recognized by org.commonmark.ext.gfm.strikethrough extension

Open davidkwlam opened this issue 2 years ago • 0 comments

Steps to reproduce the problem (provide example Markdown if applicable):

This is a GFM ~strikethrough~

Expected behavior:

<p>This is a GFM <del>strikethrough</del></p>

Actual behavior:

<p>This is a GFM ~strikethrough~</p>

Notes:

This works fine with double tilde: This is a GFM ~~strikethrough~~ is correctly parsed to <p>This is a GFM <del>strikethrough</del></p>. I'm passing a StrikethroughExtension instance to both the parser and html renderer.

GitHub flavoured markdown supports both double and single tilde strikethrough:

~single tilde strikethrough~: ~single tilde strikethrough~ ~~double tilde strikethrough~~: ~~double tilde strikethrough~~

Thank you for all your hard work!

davidkwlam avatar Sep 12 '22 18:09 davidkwlam