Remove use of 's' regex flag (#31292)

This commit is contained in:
Lukas Olson 2019-02-19 11:05:05 -07:00
parent 02d6b59894
commit ef3fd80461

View file

@ -47,8 +47,8 @@ export function test(node, string) {
const regex = value
.split(wildcardSymbol)
.map(escapeRegExp)
.join('.*');
const regexp = new RegExp(`^${regex}$`, 's');
.join('[\\s\\S]*');
const regexp = new RegExp(`^${regex}$`);
return regexp.test(string);
}