Skip to content

Commit

Permalink
fix: search for duplicate keyword boundary error #528
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Apr 27, 2024
1 parent f41cea2 commit d4c6cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/core/draw/interactive/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class Search {
let index = text.indexOf(payload)
while (index !== -1) {
matchStartIndexList.push(index)
index = text.indexOf(payload, index + 1)
index = text.indexOf(payload, index + payload.length)
}
for (let m = 0; m < matchStartIndexList.length; m++) {
const startIndex = matchStartIndexList[m]
Expand Down

0 comments on commit d4c6cd2

Please sign in to comment.