Skip to content

Commit

Permalink
Revert "put back escape for adjacent nextMatch at the end"
Browse files Browse the repository at this point in the history
This reverts commit f5d51ee.
  • Loading branch information
2wheeh committed May 9, 2024
1 parent 3178daa commit 5c7e10f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/lexical-text/src/registerLexicalTextEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function registerLexicalTextEntity<T extends TextNode>(
}
}

// eslint-disable-next-line no-constant-condition
let prevMatchLengthToSkip = 0;
// eslint-disable-next-line no-constant-condition
while (true) {
Expand Down Expand Up @@ -127,6 +128,12 @@ export function registerLexicalTextEntity<T extends TextNode>(
return;
}
}
} else {
const nextMatch = getMatch(nextText);

if (nextMatch !== null && nextMatch.start === 0) {
return;
}
}

if (match === null) {
Expand Down Expand Up @@ -163,11 +170,6 @@ export function registerLexicalTextEntity<T extends TextNode>(
if (currentNode == null) {
return;
}

const nextMatch = getMatch(nextText);
if (nextMatch !== null && nextMatch.start === 0) {
return;
}
}
};

Expand Down

0 comments on commit 5c7e10f

Please sign in to comment.