aboutsummaryrefslogtreecommitdiff
path: root/node_modules/convert-source-map/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-27 19:33:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-27 19:34:16 +0100
commit0e6de2c31dbf8c21277481f112e99c52b913940f (patch)
tree91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/convert-source-map/index.js
parentceda0da31ad542c598c68146ae0712ca03df3d71 (diff)
node_modules
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);
};