Skip to content

Commit

Permalink
chore(search): replace deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme authored and nikku committed Sep 12, 2024
1 parent 35a911f commit a2211cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/features/search/BpmnSearchProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ function matchAndSplit(text, pattern) {
if (i > -1) {
if (i !== 0) {
tokens.push({
normal: originalText.substr(0, i)
normal: originalText.slice(0, i)
});
}

tokens.push({
matched: originalText.substr(i, pattern.length)
matched: originalText.slice(i, pattern.length)
});

if (pattern.length + i < text.length) {
tokens.push({
normal: originalText.substr(pattern.length + i, text.length)
normal: originalText.slice(pattern.length + i, text.length)
});
}
} else {
Expand Down

0 comments on commit a2211cb

Please sign in to comment.