[Pkg-javascript-commits] [less.js] 40/285: fix trailing whitespace

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


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

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit aa3abeb716c06842bff194e0fd50586f23c3f558
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sun Mar 2 17:51:31 2014 +0000

    fix trailing whitespace
---
 lib/less/environment/node.js |  4 ++--
 lib/less/functions.js        | 10 +++++-----
 lib/less/index.js            |  6 +++---
 lib/less/parser.js           | 12 ++++++------
 lib/less/tree.js             |  6 +++---
 lib/less/tree/color.js       | 10 +++++-----
 lib/less/tree/mixin-call.js  | 24 ++++++++++++------------
 7 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/lib/less/environment/node.js b/lib/less/environment/node.js
index d4ef9c3..b8ec45e 100644
--- a/lib/less/environment/node.js
+++ b/lib/less/environment/node.js
@@ -133,7 +133,7 @@ module.exports = {
     },
     loadFile: function(env, filename, currentDirectory, callback) {
         var fullFilename,
-            data, 
+            data,
             isUrl = isUrlRe.test( filename );
 
         if (isUrl || isUrlRe.test(currentDirectory)) {
@@ -206,4 +206,4 @@ module.exports = {
             }
         }
     }
-};
\ No newline at end of file
+};
diff --git a/lib/less/functions.js b/lib/less/functions.js
index 3eef3f1..c0c1dc5 100644
--- a/lib/less/functions.js
+++ b/lib/less/functions.js
@@ -342,7 +342,7 @@ var functions = {
         return new(tree.Dimension)(n.value * 100, '%');
     },
     color: function(c) {
-        if ((c instanceof tree.Quoted) && 
+        if ((c instanceof tree.Quoted) &&
             (/^#([a-f0-9]{6}|[a-f0-9]{3})$/i.test(c.value))) {
             return new(tree.Color)(c.value.slice(1));
         }
@@ -350,9 +350,9 @@ var functions = {
             c.keyword = undefined;
             return c;
         }
-        throw { 
-            type:    "Argument", 
-            message: "argument must be a color keyword or 3/6 digit hex e.g. #FFF" 
+        throw {
+            type:    "Argument",
+            message: "argument must be a color keyword or 3/6 digit hex e.g. #FFF"
         };
     },
     iscolor: function (n) {
@@ -729,5 +729,5 @@ tree.functionCall = function(env, currentFileInfo, environment) {
 tree.functionCall.prototype = functions;
 
 return functions;
-    
+
 };
diff --git a/lib/less/index.js b/lib/less/index.js
index f4730de..043029e 100644
--- a/lib/less/index.js
+++ b/lib/less/index.js
@@ -17,7 +17,7 @@ less.render = function (input, options, callback) {
             var css;
             try {
                 css = root && root.toCSS && root.toCSS(options);
-            } 
+            }
             catch (err) { callback(err); return; }
             callback(null, css);
         });
@@ -27,7 +27,7 @@ less.render = function (input, options, callback) {
         process.nextTick(function () {
             parser.parse(input, function (e, root) {
                 if (e) { return ee.emit('error', e); }
-                try { ee.emit('success', root.toCSS(options)); } 
+                try { ee.emit('success', root.toCSS(options)); }
                 catch (err) { ee.emit('error', err); }
             });
         });
@@ -83,7 +83,7 @@ less.formatError = function(ctx, options) {
 
     return message;
 };
-    
+
 less.writeError = function (ctx, options) {
     options = options || {};
     if (options.silent) { return; }
diff --git a/lib/less/parser.js b/lib/less/parser.js
index c586fea..b9be06c 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -81,20 +81,20 @@ var Parser = function Parser(env) {
                 rootpath: currentFileInfo.rootpath,
                 rootFilename: currentFileInfo.rootFilename
                 };
-            
+
             less.environment.loadFile(env, path, currentFileInfo.currentDirectory, function loadFileCallback(e, contents, resolvedFilename) {
                 if (e) {
                     fileParsedFunc(e);
                     return;
                 }
 
-                // Pass on an updated rootpath if path of imported file is relative and file 
+                // Pass on an updated rootpath if path of imported file is relative and file
                 // is in a (sub|sup) directory
-                // 
-                // Examples: 
+                //
+                // Examples:
                 // - If path of imported file is 'module/nav/nav.less' and rootpath is 'less/',
                 //   then rootpath should become 'less/module/nav/'
-                // - If path of imported file is '../mixins.less' and rootpath is 'less/', 
+                // - If path of imported file is '../mixins.less' and rootpath is 'less/',
                 //   then rootpath should become 'less/../'
                 newFileInfo.currentDirectory = less.environment.getPath(env, resolvedFilename);
                 if(newFileInfo.relativeUrls) {
@@ -121,7 +121,7 @@ var Parser = function Parser(env) {
                     new(less.Parser)(newEnv).parse(contents, function (e, root) {
                         fileParsedFunc(e, root, resolvedFilename);
                     });
-                }                    
+                }
             });
         }
     };
diff --git a/lib/less/tree.js b/lib/less/tree.js
index 393f71b..5073cda 100644
--- a/lib/less/tree.js
+++ b/lib/less/tree.js
@@ -1,7 +1,7 @@
 module.exports = function (less) {
 
 var tree = {};
-  
+
 tree.debugInfo = function(env, ctx, lineSeperator) {
     var result="";
     if (env.dumpLineNumbers && !env.compress) {
@@ -131,8 +131,8 @@ tree.Media = require('./tree/media')(tree);
 tree.UnicodeDescriptor = require('./tree/unicode-descriptor')(tree);
 tree.Negative = require('./tree/negative')(tree);
 tree.Extend = require('./tree/extend')(tree);
-tree.RulesetCall = require('./tree/ruleset-call')(tree);    
+tree.RulesetCall = require('./tree/ruleset-call')(tree);
 
 return tree;
 
-};
\ No newline at end of file
+};
diff --git a/lib/less/tree/color.js b/lib/less/tree/color.js
index bbeb542..533235f 100644
--- a/lib/less/tree/color.js
+++ b/lib/less/tree/color.js
@@ -43,7 +43,7 @@ Color.prototype = {
     },
     toCSS: function (env, doNotCompress) {
         var compress = env && env.compress && !doNotCompress, color, alpha;
-        
+
         // `keyword` is set if this color was originally
         // converted from a named color string so we need
         // to respect this and try to output named color too.
@@ -61,8 +61,8 @@ Color.prototype = {
                 return clamp(Math.round(c), 255);
             }).concat(clamp(alpha, 1))
                 .join(',' + (compress ? '' : ' ')) + ")";
-        } 
-        
+        }
+
         color = this.toRGB();
 
         if (compress) {
@@ -169,9 +169,9 @@ Color.fromKeyword = function(keyword) {
         c = new(Color)(data.colors[key].slice(1));
     }
     else if (key === "transparent") {
-        c = new(Color)([0, 0, 0], 0); 
+        c = new(Color)([0, 0, 0], 0);
     }
-    
+
     if (c) {
         c.keyword = keyword;
         return c;
diff --git a/lib/less/tree/mixin-call.js b/lib/less/tree/mixin-call.js
index 606600a..de514e7 100644
--- a/lib/less/tree/mixin-call.js
+++ b/lib/less/tree/mixin-call.js
@@ -20,7 +20,7 @@ Call.prototype = {
     eval: function (env) {
         var mixins, mixin, args, rules = [], match = false, i, m, f, isRecursive, isOneFound, rule,
             candidates = [], candidate, conditionResult = [], defaultFunc = tree.defaultFunc,
-            defaultResult, defNone = 0, defTrue = 1, defFalse = 2, count; 
+            defaultResult, defNone = 0, defTrue = 1, defFalse = 2, count;
 
         args = this.arguments && this.arguments.map(function (a) {
             return { name: a.name, value: a.value.eval(env) };
@@ -29,12 +29,12 @@ Call.prototype = {
         for (i = 0; i < env.frames.length; i++) {
             if ((mixins = env.frames[i].find(this.selector)).length > 0) {
                 isOneFound = true;
-                
+
                 // To make `default()` function independent of definition order we have two "subpasses" here.
                 // At first we evaluate each guard *twice* (with `default() == true` and `default() == false`),
                 // and build candidate list with corresponding flags. Then, when we know all possible matches,
                 // we make a final decision.
-                
+
                 for (m = 0; m < mixins.length; m++) {
                     mixin = mixins[m];
                     isRecursive = false;
@@ -47,11 +47,11 @@ Call.prototype = {
                     if (isRecursive) {
                         continue;
                     }
-                    
-                    if (mixin.matchArgs(args, env)) {  
+
+                    if (mixin.matchArgs(args, env)) {
                         candidate = {mixin: mixin, group: defNone};
-                        
-                        if (mixin.matchCondition) { 
+
+                        if (mixin.matchCondition) {
                             for (f = 0; f < 2; f++) {
                                 defaultFunc.value(f);
                                 conditionResult[f] = mixin.matchCondition(args, env);
@@ -63,16 +63,16 @@ Call.prototype = {
                                 }
 
                                 candidates.push(candidate);
-                            }   
+                            }
                         }
                         else {
                             candidates.push(candidate);
                         }
-                        
+
                         match = true;
                     }
                 }
-                
+
                 defaultFunc.reset();
 
                 count = [0, 0, 0];
@@ -91,7 +91,7 @@ Call.prototype = {
                             index: this.index, filename: this.currentFileInfo.filename };
                     }
                 }
-                
+
                 for (m = 0; m < candidates.length; m++) {
                     candidate = candidates[m].group;
                     if ((candidate === defNone) || (candidate === defaultResult)) {
@@ -108,7 +108,7 @@ Call.prototype = {
                         }
                     }
                 }
-                
+
                 if (match) {
                     if (!this.currentFileInfo || !this.currentFileInfo.reference) {
                         for (i = 0; i < rules.length; i++) {

-- 
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