We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f60f78 commit 3f1d3f7Copy full SHA for 3f1d3f7
src/highlight-support.js
@@ -48,6 +48,11 @@ const highlightSupport = {
48
const actualStartIndex = startIndex
49
const actualEndIndex = endIndex
50
51
+ // If text is provided then validate that it matches
52
+ if (text && text !== blockText.slice(actualStartIndex, actualEndIndex)) {
53
+ return -1
54
+ }
55
+
56
highlightText.highlightMatches(editableHost, [{
57
startIndex: actualStartIndex,
58
endIndex: actualEndIndex,
0 commit comments