Skip to content

Commit

Permalink
Fixes #189
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Eklund committed Sep 6, 2024
1 parent d39eebc commit 3b0a458
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/highlightToFlatStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
FlatStrategy,
CustomObject,
Range,
Component
Component,
} from "./types";

export const highlightToFlatStrategy = (
Expand Down Expand Up @@ -80,6 +80,9 @@ function regExpToSAndC(
while ((matchArr = highlight.exec(text)) !== null) {
start = matchArr.index;
callback(start, start + matchArr[0].length);
if (highlight.lastIndex == 0) {
break;
}
}
};

Expand Down

0 comments on commit 3b0a458

Please sign in to comment.