Skip to content

Commit bfc73f9

Browse files
authored
Merge pull request #249 from evanw/LinusU-patch-1
Tweak regex in retrieveSourceMapURL
2 parents 208d1df + 4852362 commit bfc73f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source-map-support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function retrieveSourceMapURL(source) {
137137

138138
// Get the URL of the source map
139139
fileData = retrieveFile(source);
140-
var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;
140+
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
141141
// Keep executing the search to find the *last* sourceMappingURL to avoid
142142
// picking up sourceMappingURLs from comments, strings, etc.
143143
var lastMatch, match;

0 commit comments

Comments
 (0)