Base64 encode source maps

This prevents some edge cases where encodeURIComponent fails to create a valid
source map.

This particular edge case was identified when trying to create source maps for
the lesshat mixin library.

Signed-off-by: Tim Smart <tim.smart@designworks.co.nz>
This commit is contained in:
Tim Smart
2014-06-04 11:20:07 +12:00
parent fab1401fc0
commit ac0db09759

View File

@@ -127,7 +127,7 @@
if (this._writeSourceMap) {
this._writeSourceMap(sourceMapContent);
} else {
sourceMapURL = "data:application/json," + encodeURIComponent(sourceMapContent);
sourceMapURL = "data:application/json;base64," + require('./encoder.js').encodeBase64(sourceMapContent);
}
if (sourceMapURL) {