Skip to content

Commit b1cf785

Browse files
committed
fix(sourcemap-regex): fix regex to match browserify sorucemap charset
Browserify has changed the sourcemap charset to use `=` instead of `:`. This has frequently changed, so this fix changes the regex to match a single character `.` For reference: https://github.com/substack/node-browserify/blob/b2374cef35072e7690ab31a68664b0733c1b4995/changelog.markdown#1200 Fixes #130
1 parent dcc347f commit b1cf785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/lib/sourcemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ exports.init = function(grunt) {
146146

147147
var sourceContent;
148148
// Browserify, as an example, stores a datauri at sourceMappingURL.
149-
if (/data:application\/json;(charset:utf-8;)?base64,([^\s]+)/.test(sourceMapFile)) {
149+
if (/data:application\/json;(charset.utf-8;)?base64,([^\s]+)/.test(sourceMapFile)) {
150150
// Set sourceMapPath to the file that the map is inlined.
151151
sourceMapPath = filename;
152152
sourceContent = new Buffer(RegExp.$2, 'base64').toString();

0 commit comments

Comments
 (0)