Fixed super minor issue with import pragma (#5521)

This commit is contained in:
Cameron Fischer
2021-05-23 17:39:06 +01:00
committed by GitHub
parent 8fbf52e419
commit 61714cbda3
2 changed files with 14 additions and 1 deletions
@@ -36,7 +36,7 @@ exports.parse = function() {
// Move past the pragma invocation
this.parser.pos = this.matchRegExp.lastIndex;
// Parse the filter terminated by a line break
var reMatch = /(.*)(\r?\n)|$/mg;
var reMatch = /(.*)(?:$|\r?\n)/mg;
reMatch.lastIndex = this.parser.pos;
var match = reMatch.exec(this.parser.source);
this.parser.pos = reMatch.lastIndex;