Skip to content

Bug: Combining bold italic strikethrough can generate invalid markdown #2303

@hanford

Description

@hanford

Combining Bold, Italic and strikethrough formats can generate invalid markdown

Lexical version: 0.2.9

Steps To Reproduce

  1. Enable Bold, type (Bold )
  2. Enable Italic, type (Italic )
  3. Enable strike through, type (bold italic strikethrough)
  4. View generated markdown

Note that the generated markdown is:

**bold *italic ~~strikethrough***~~

Which escapes strikethrough incorrectly, it should be

**bold *italic ~~strikethrough~~***

The current behavior

Invalid markdown is generated

The expected behavior

Proper markdown should be generated

Current bad state
Screen Shot 2022-05-31 at 12 42 06 PM

Screen Shot 2022-05-31 at 12 36 29 PM

Fixed state with open PR:
Screen Shot 2022-05-31 at 12 42 33 PM
Screen Shot 2022-05-31 at 12 36 55 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions