sourcemap-validator
Advanced tools
Comparing version 1.0.2 to 1.0.3
12
index.js
@@ -50,7 +50,7 @@ var validate | ||
try { | ||
var marker = '//@ sourceMappingURL=data:application/json;base64,' | ||
, offset = min.indexOf(marker); | ||
var re = /\s*\/\/(?:@|#) sourceMappingURL=data:application\/json;base64,(\S*)$/m | ||
, map = min.match(re); | ||
map = (new Buffer(min.substring(offset + marker.length), 'base64')).toString(); | ||
min = min.substring(0, offset); | ||
map = (new Buffer(map[1], 'base64')).toString(); | ||
min = min.replace(re, ''); | ||
} | ||
@@ -63,3 +63,3 @@ catch (e) { | ||
try { | ||
consumer = new SMConsumer(map) | ||
consumer = new SMConsumer(map); | ||
} | ||
@@ -74,3 +74,3 @@ catch (e) { | ||
srcs[src] = content; | ||
}) | ||
}); | ||
@@ -77,0 +77,0 @@ each(srcs, function (src, file) { |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": { | ||
@@ -17,0 +17,0 @@ "type": "git", |
5616