@lvce-editor/find-widget-worker 3.19.0 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1708,9 +1708,13 @@ const buildRegex = (searchString, options) => {
1708
1708
 
1709
1709
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types -- Appends matches to the shared output array.
1710
1710
  const collectMatchesForLineInternal = (matches, line, lineIndex, regex) => {
1711
+ regex.lastIndex = 0;
1711
1712
  let lastMatch = regex.exec(line);
1712
1713
  while (lastMatch) {
1713
1714
  matches.push(lineIndex, lastMatch.index, lastMatch[0].length);
1715
+ if (lastMatch[0].length === 0) {
1716
+ regex.lastIndex = lastMatch.index + 1;
1717
+ }
1714
1718
  lastMatch = regex.exec(line);
1715
1719
  }
1716
1720
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/find-widget-worker",
3
- "version": "3.19.0",
3
+ "version": "3.21.0",
4
4
  "description": "Web Worker for the find widget in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",