Skip to content

Commit

Permalink
Misc.
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottvincent committed Dec 3, 2023
1 parent 303cc81 commit a17d9f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var loopRegexes = function(
regexes, str, mode = "match", highestPosition = true
) {
var _match;
var _maxLength = str.length;
var _minLength = mode === "split" ? 1 : 0;
var _maxLength = str.length;

for (var _i = 0; _i < regexes.length; _i++) {
var _regex = regexes[_i];
Expand All @@ -47,7 +47,6 @@ var loopRegexes = function(
}
} else if (mode === "split" || mode === "match") {
// A successfull split must return an array with at least two items

if ((_currentMatch || []).length > _minLength) {
if (highestPosition === true) {
// No previous match?
Expand Down

0 comments on commit a17d9f8

Please sign in to comment.