When combining strikethrough (~~) with other markup, the behavior differs depending on the nesting order.
-
When strikethrough is nested inside, strikethrough renders correctly:
**~~a~~**b renders as ab
<b>~~a~~</b>b renders as ab
-
When strikethrough wraps other markup, no strikethrough is produced:
~~**a**~~b renders as ~~a~~b
~~<b>a</b>~~b renders as ~~a~~b
However, adding a space after makes it work:
~~**a**~~ b renders as a b
~~<b>a</b>~~ b renders as a b
This inconsistency seems unexpected, as the only difference is whether strikethrough is the outer or inner markup.
Would it be possible to:
- Confirm if this different behavior based on nesting order is intended
- If not intended, make the behavior consistent
- If intended, document this behavior in the GFM spec