Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioGr committed Sep 27, 2024
1 parent 558383d commit ce86444
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/lexical-markdown/src/MarkdownImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ function importTextMatchTransformers(
}

const startIndex = match.index || 0;
const endIndex =
transformer && transformer.getEndIndex
? transformer.getEndIndex(textNode, match)
: startIndex + match[0].length;
const endIndex = transformer.getEndIndex
? transformer.getEndIndex(textNode, match)
: startIndex + match[0].length;

let replaceNode, newTextNode;

if (startIndex === 0) {
Expand Down

0 comments on commit ce86444

Please sign in to comment.