Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Inconsistent strikethrough behavior with different nesting orders of markup #369

@Xuanghdu

Description

@Xuanghdu

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:

  1. Confirm if this different behavior based on nesting order is intended
  2. If not intended, make the behavior consistent
  3. If intended, document this behavior in the GFM spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions