aboutsummaryrefslogtreecommitdiff
path: root/node_modules/convert-source-map/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/convert-source-map/index.js')
-rw-r--r--node_modules/convert-source-map/index.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/node_modules/convert-source-map/index.js b/node_modules/convert-source-map/index.js
index e171a673c..2d08f1e2b 100644
--- a/node_modules/convert-source-map/index.js
+++ b/node_modules/convert-source-map/index.js
@@ -10,9 +10,8 @@ Object.defineProperty(exports, 'commentRegex', {
Object.defineProperty(exports, 'mapFileCommentRegex', {
get: function getMapFileCommentRegex () {
- //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
- // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
- return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
+ // Matches sourceMappingURL in either // or /* comment styles.
+ return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
}
});
@@ -73,7 +72,7 @@ Converter.prototype.toObject = function () {
};
Converter.prototype.addProperty = function (key, value) {
- if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead');
+ if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
return this.setProperty(key, value);
};