We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 01d4b9e + 5d0f434 commit 76d9e88Copy full SHA for 76d9e88
src/index.js
@@ -5,6 +5,9 @@ const findWithRegex = (regex, contentBlock, callback) => {
5
let start; // eslint-disable-line
6
// Go through all matches in the text and return the indizes to the callback
7
while ((matchArr = regex.exec(text)) !== null) { // eslint-disable-line
8
+ if (matchArr.index === regex.lastIndex) {
9
+ regex.lastIndex++;
10
+ }
11
start = matchArr.index;
12
callback(start, start + matchArr[0].length);
13
}
0 commit comments