[Pkg-javascript-commits] [less.js] 01/09: Base64 encode source maps

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:22:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v1.7.2
in repository less.js.

commit ac0db097593433d91feda1be96a16199f2c8a273
Author: Tim Smart <tim.smart at designworks.co.nz>
Date:   Wed Jun 4 11:20:07 2014 +1200

    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 at designworks.co.nz>
---
 lib/less/source-map-output.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/less/source-map-output.js b/lib/less/source-map-output.js
index 9a090d4..b95d7c2 100644
--- a/lib/less/source-map-output.js
+++ b/lib/less/source-map-output.js
@@ -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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list