JS: Consider empty regexp to be obviously empty

This commit is contained in:
Asger F
2022-09-13 10:13:03 +02:00
parent e07e6c9053
commit b4e6fb781a
2 changed files with 5 additions and 3 deletions

View File

@@ -83,10 +83,10 @@ function nonWordBoundary(x) {
}
function emptyRegex(x) {
return new RegExp("").test(x); // NOT OK
return new RegExp("").test(x); // OK
}
function parserTest(x) {
/(\w\s*:\s*[^:}]+|#){|@import[^\n]+(?:url|,)/.test(x); // OK
/^((?:a{0,2}|-)|\w\{\d,\d\})+X$/.text(x); // ok
}
/^((?:a{0,2}|-)|\w\{\d,\d\})+X$/.text(x); // ok
}