Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
ensure sourceMapRegEx doesnt remove inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 16, 2017
1 parent cd19b07 commit 49a34ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var wrapSourceMap = function(map) {
return new sourceMap.SourceMapConsumer(map);
};

var sourceMapRegEx = /\/\/[@#] ?(sourceURL|sourceMappingURL)=([^\n'"]+)/;
var sourceMapRegEx = /^\s*\/\/[@#] ?(sourceURL|sourceMappingURL)=([^\n'"]+)/m;
exports.removeSourceMaps = function(source) {
return source.replace(sourceMapRegEx, '');
};
Expand Down

0 comments on commit 49a34ce

Please sign in to comment.