Skip to content

Bug: text-match transformer transforms markdown wrapped in text formatting tokens instead of text-format transformer #7763

@MarekKuncik

Description

@MarekKuncik

In case the markdown contains formatted text and the another formatted text that contains markdown transformed by a text-match transformer (e.g. link markdown) after it, lexical escapes formatting tokens and transforms this content using the text-match transformer instead of text-format transformer.

Lexical version: latest

Steps To Reproduce

Try rendering this markdown

sample **formatter** text and `[link](example.com)`

Image

It seems this have been broken by this pr #7004

I fixed it by adding foundTextMatch.startIndex > foundTextFormat.endIndex check in importTextTransformers.ts -> importTextTransformers:

PR -> #7769

Link to code example:

The current behavior

The expected behavior

Impact of fix

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