[Pkg-javascript-commits] [less.js] 36/285: Trim 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 7efbcd31cf4b86b04f4f2e59358ccb4903ed7009
Author: XhmikosR <xhmikosr at users.sourceforge.net>
Date: Sat Mar 1 19:55:53 2014 +0200
Trim trailing whitespace.
---
CHANGELOG.md | 4 +--
CONTRIBUTING.md | 16 +++++------
benchmark/benchmark.less | 18 ++++++------
build.gradle | 28 +++++++++---------
build/build.yml | 2 +-
build/rhino-modules.js | 6 ++--
lib/less/functions.js | 40 +++++++++++++-------------
lib/less/import-visitor.js | 6 ++--
lib/less/index.js | 14 ++++-----
lib/less/parser.js | 48 +++++++++++++++----------------
lib/less/rhino.js | 10 +++----
lib/less/source-map-output.js | 2 +-
lib/less/tree/anonymous.js | 8 +++---
lib/less/tree/call.js | 2 +-
lib/less/tree/color.js | 4 +--
lib/less/tree/dimension.js | 4 +--
lib/less/tree/import.js | 4 +--
lib/less/tree/media.js | 10 +++----
lib/less/tree/mixin.js | 26 ++++++++---------
lib/less/tree/quoted.js | 6 ++--
lib/less/tree/rule.js | 4 +--
lib/less/tree/ruleset.js | 26 ++++++++---------
lib/less/tree/selector.js | 6 ++--
lib/less/tree/url.js | 2 +-
lib/less/tree/variable.js | 6 ++--
lib/source-map/source-map-footer.js | 4 +--
lib/source-map/source-map-header.js | 2 +-
test/browser/jasmine.js | 16 +++++------
test/index.js | 6 ++--
test/less/colors.less | 2 +-
test/less/comments.less | 10 +++----
test/less/css-escapes.less | 20 ++++++-------
test/less/css.less | 2 +-
test/less/errors/import-missing.less | 2 +-
test/less/extend-selector.less | 2 +-
test/less/extract-and-length.less | 12 ++++----
test/less/functions.less | 6 ++--
test/less/globalVars/simple.json | 2 +-
test/less/import/imports/font.less | 6 ++--
test/less/media.less | 4 +--
test/less/merge.less | 2 +-
test/less/mixins-closure.less | 8 +++---
test/less/mixins-guards-default-func.less | 6 ++--
test/less/mixins-guards.less | 22 +++++++-------
test/less/mixins-important.less | 2 +-
test/less/mixins-named-args.less | 4 +--
test/less/mixins-nested.less | 4 +--
test/less/mixins.less | 2 +-
test/less/property-name-interp.less | 4 +--
test/less/scope.less | 2 +-
test/less/selectors.less | 8 +++---
test/less/sourcemaps/basic.json | 2 +-
test/less/variables.less | 20 ++++++-------
test/less/whitespace.less | 10 +++----
54 files changed, 247 insertions(+), 247 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd76027..3cf3ff4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -135,7 +135,7 @@
- fix passing of strict maths option
# 1.4.0 Beta 4
-
+
2013-05-04
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
@@ -168,7 +168,7 @@
- significant bug fixes to our debug options
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
- an error is shown if properties are used outside of a ruleset
- - added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
+ - added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
- added luma, hsvhue, hsvsaturation, hsvvalue functions
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
- added convert function, e.g. convert(1rad, deg) => value in degrees
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6508bb1..b838412 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,21 +1,21 @@
# Contributing to Less.js
-> We welcome feature requests and bug reports. Please read these guidelines before submitting one.
+> We welcome feature requests and bug reports. Please read these guidelines before submitting one.
<span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>. As a courtesy to avoid sending notifications to any user that might have the `@username` being referenced, please remember that GitHub usernames also start with the at sign. If you don't wrap them in backticks, users will get unintended notifications from you.
-GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown).
+GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown).
## Reporting Issues
-We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Less.js core. Please read the following guidelines before opening any issue.
+We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Less.js core. Please read the following guidelines before opening any issue.
1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Less.js's code with [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
-3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
-3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
+3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
+3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug.
5. If you have a solution or suggestion for how to fix the bug you're reporting, please include it, or make a pull request - don't assume the maintainers know how to fix it just because you do.
@@ -32,15 +32,15 @@ Please report documentation issues in [the documentation project](https://github
_Pull requests are encouraged!_
-* Start by adding a feature request to get feedback and see how your idea is received.
+* Start by adding a feature request to get feedback and see how your idea is received.
* If your pull request solves an existing issue, but it's different in some way, _please create a new issue_ and make sure to discuss it with the core contributors. Otherwise you risk your hard work being rejected.
* Do not change the **./dist/** folder, we do this when releasing
-* _Please add tests_ for your work. Tests are invoked using `grunt test` command. It will run both node.js tests and browser ([PhantomJS](http://phantomjs.org/)) tests.
+* _Please add tests_ for your work. Tests are invoked using `grunt test` command. It will run both node.js tests and browser ([PhantomJS](http://phantomjs.org/)) tests.
### Coding Standards
* Always use spaces, never tabs
-* End lines in semi-colons.
+* End lines in semi-colons.
* Loosely aim towards jsHint standards
diff --git a/benchmark/benchmark.less b/benchmark/benchmark.less
index c9c0f66..6053420 100644
--- a/benchmark/benchmark.less
+++ b/benchmark/benchmark.less
@@ -2080,9 +2080,9 @@ div.panel {
*/
-/*
+/*
* Comment Test
- *
+ *
* - cloudhead (http://cloudhead.net)
*
*/
@@ -2105,7 +2105,7 @@ div.panel {
/* @group Variables
------------------- */
#comments /* boo */ {
- /**/ // An empty comment
+ /**/ // An empty comment
color: red; /* A C-style comment */
background-color: orange; // A little comment
font-size: 12px;
@@ -2844,9 +2844,9 @@ td, input {
*/
-/*
+/*
* Comment Test
- *
+ *
* - cloudhead (http://cloudhead.net)
*
*/
@@ -2869,7 +2869,7 @@ td, input {
/* @group Variables
------------------- */
#comments /* boo */ {
- /**/ // An empty comment
+ /**/ // An empty comment
color: red; /* A C-style comment */
background-color: orange; // A little comment
font-size: 12px;
@@ -3608,9 +3608,9 @@ td, input {
*/
-/*
+/*
* Comment Test
- *
+ *
* - cloudhead (http://cloudhead.net)
*
*/
@@ -3633,7 +3633,7 @@ td, input {
/* @group Variables
------------------- */
#comments /* boo */ {
- /**/ // An empty comment
+ /**/ // An empty comment
color: red; /* A C-style comment */
background-color: orange; // A little comment
font-size: 12px;
diff --git a/build.gradle b/build.gradle
index 7042b92..b626b5d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -123,13 +123,13 @@ task clean << {
}
class SourceMapRhinoTest extends RhinoTest {
-
+
// helper to get the output map file
def getOutputMap(lessFile) {
def outFile = project.file(lessFile.path.replace('test/less', project.testOut).replace('.less', '.css'))
return project.file(outFile.path + ".map");
}
-
+
// callback to add SourceMap options to the options list
def postProcessOptions(options, lessFile) {
def outFile = getOutputMap(lessFile)
@@ -141,14 +141,14 @@ class SourceMapRhinoTest extends RhinoTest {
options
}
-
+
// Callback to validate output
def handleResult(exec, out, lessFile) {
def actualFile = getOutputMap(lessFile)
- def expectedFile = project.file(projectDir + fs + "test" + fs + testDir + fs + lessFile.name.replace(".less", ".json"))
+ def expectedFile = project.file(projectDir + fs + "test" + fs + testDir + fs + lessFile.name.replace(".less", ".json"))
assert actualFile.text == expectedFile.text
}
-
+
}
class DebugRhinoTest extends RhinoTest {
@@ -159,11 +159,11 @@ class DebugRhinoTest extends RhinoTest {
def globalReplacements(input, directory) {
def pDirectory = toPlatformFs(directory)
- def p = lessRootDir + fs + pDirectory
+ def p = lessRootDir + fs + pDirectory
def pathimport = p + toPlatformFs("import/")
def pathesc = escapeIt(p)
def pathimportesc = escapeIt(pathimport)
-
+
def result = input.replace("{path}", p).replace("{pathesc}", pathesc).replace("{pathimport}", pathimport)
return result.replace("{pathimportesc}", pathimportesc).replace("\r\n", "\n")
}
@@ -182,16 +182,16 @@ class RhinoTest extends DefaultTask {
def fs = File.separator;
def projectDir = toUpperCaseDriveLetter(System.getProperty("user.dir"));
def lessRootDir = projectDir + fs + "test" + fs + "less"
-
+
def toUpperCaseDriveLetter(path) {
if (path.charAt(1)==':' && path.charAt(2)=='\\') {
return path.substring(0,1).toUpperCase() + path.substring(1);
- }
+ }
return path;
}
def toPlatformFs(path) {
- return path.replace('\\', fs).replace('/', fs);
+ return path.replace('\\', fs).replace('/', fs);
}
def expectedCssPath(lessFilePath) {
@@ -216,12 +216,12 @@ class RhinoTest extends DefaultTask {
return '\033[' + styles[style][0] + 'm' + str +
'\033[' + styles[style][1] + 'm';
}
-
+
// Callback for subclasses to make any changes to the options
def postProcessOptions(options, lessFile) {
options
}
-
+
// Callback to validate output
def handleResult(exec, out, lessFile) {
def actual = out.toString().trim()
@@ -273,7 +273,7 @@ class RhinoTest extends DefaultTask {
standardOutput = out
ignoreExitValue = true
}
- println "rhinoTestSrc: ${project.rhinoTestSrc}"
+ println "rhinoTestSrc: ${project.rhinoTestSrc}"
try {
def exec = project.javaexec(execOptions)
handleResult(exec, out, lessFile)
@@ -333,7 +333,7 @@ class GruntTask extends Exec {
private String gruntExecutable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
private String switches = "--no-color"
- String gruntArgs = ""
+ String gruntArgs = ""
public GruntTask() {
super()
diff --git a/build/build.yml b/build/build.yml
index b5a2234..fca8a35 100644
--- a/build/build.yml
+++ b/build/build.yml
@@ -150,7 +150,7 @@ tree:
- <%= build.lib %>/tree/url.js
- <%= build.lib %>/tree/value.js
- <%= build.lib %>/tree/variable.js
-
+
# =================================
# source-map build
# =================================
diff --git a/build/rhino-modules.js b/build/rhino-modules.js
index 260a866..78829d2 100644
--- a/build/rhino-modules.js
+++ b/build/rhino-modules.js
@@ -55,9 +55,9 @@
} else if (part === '' && result.length > 0) {
// skip
} else if (part !== '.') {
- if (part.slice(-1)==='\\' || part.slice(-1)==='/') {
- part = part.slice(0, -1);
- }
+ if (part.slice(-1)==='\\' || part.slice(-1)==='/') {
+ part = part.slice(0, -1);
+ }
result.push(part);
}
}
diff --git a/lib/less/functions.js b/lib/less/functions.js
index 7f048a4..0a30e10 100644
--- a/lib/less/functions.js
+++ b/lib/less/functions.js
@@ -302,7 +302,7 @@ tree.functions = {
continue;
}
currentUnified = current.unit.toString() === "" && unitClone !== undefined ? new(tree.Dimension)(current.value, unitClone).unify() : current.unify();
- unit = currentUnified.unit.toString() === "" && unitStatic !== undefined ? unitStatic : currentUnified.unit.toString();
+ unit = currentUnified.unit.toString() === "" && unitStatic !== undefined ? unitStatic : currentUnified.unit.toString();
unitStatic = unit !== "" && unitStatic === undefined || unit !== "" && order[0].unify().unit.toString() === "" ? unit : unitStatic;
unitClone = unit !== "" && unitClone === undefined ? current.unit.toString() : unitClone;
j = values[""] !== undefined && unit !== "" && unit === unitStatic ? values[""] : values[unit];
@@ -392,12 +392,12 @@ tree.functions = {
},
shade: function(color, amount) {
return this.mix(this.rgb(0, 0, 0), color, amount);
- },
+ },
extract: function(values, index) {
- index = index.value - 1; // (1-based index)
+ index = index.value - 1; // (1-based index)
// handle non-array values as an array of length 1
// return 'undefined' if index is invalid
- return Array.isArray(values.value)
+ return Array.isArray(values.value)
? values.value[index] : Array(values)[index];
},
length: function(values) {
@@ -583,15 +583,15 @@ tree._mime = {
var mathFunctions = {
// name, unit
- ceil: null,
- floor: null,
- sqrt: null,
+ ceil: null,
+ floor: null,
+ sqrt: null,
abs: null,
- tan: "",
- sin: "",
+ tan: "",
+ sin: "",
cos: "",
- atan: "rad",
- asin: "rad",
+ atan: "rad",
+ asin: "rad",
acos: "rad"
};
@@ -616,19 +616,19 @@ function colorBlend(mode, color1, color2) {
var ab = color1.alpha, cb, // backdrop
as = color2.alpha, cs, // source
ar, cr, r = []; // result
-
+
ar = as + ab * (1 - as);
for (var i = 0; i < 3; i++) {
cb = color1.rgb[i] / 255;
cs = color2.rgb[i] / 255;
cr = mode(cb, cs);
if (ar) {
- cr = (as * cs + ab * (cb
+ cr = (as * cs + ab * (cb
- as * (cb + cs - cr))) / ar;
}
r[i] = cr * 255;
}
-
+
return new(tree.Color)(r, ar);
}
@@ -638,7 +638,7 @@ var colorBlendMode = {
},
screen: function(cb, cs) {
return cb + cs - cb * cs;
- },
+ },
overlay: function(cb, cs) {
cb *= 2;
return (cb <= 1)
@@ -651,7 +651,7 @@ var colorBlendMode = {
e = 1;
d = (cb > 0.25) ? Math.sqrt(cb)
: ((16 * cb - 12) * cb + 4) * cb;
- }
+ }
return cb - (1 - 2 * cs) * e * (d - cb);
},
hardlight: function(cb, cs) {
@@ -698,25 +698,25 @@ tree.defaultFunc = {
function initFunctions() {
var f, tf = tree.functions;
-
+
// math
for (f in mathFunctions) {
if (mathFunctions.hasOwnProperty(f)) {
tf[f] = _math.bind(null, Math[f], mathFunctions[f]);
}
}
-
+
// color blending
for (f in colorBlendMode) {
if (colorBlendMode.hasOwnProperty(f)) {
tf[f] = colorBlend.bind(null, colorBlendMode[f]);
}
}
-
+
// default
f = tree.defaultFunc;
tf["default"] = f.eval.bind(f);
-
+
} initFunctions();
function hsla(color) {
diff --git a/lib/less/import-visitor.js b/lib/less/import-visitor.js
index 7d69337..a75f17f 100644
--- a/lib/less/import-visitor.js
+++ b/lib/less/import-visitor.js
@@ -38,7 +38,7 @@
var importVisitor = this,
evaldImportNode,
inlineCSS = importNode.options.inline;
-
+
if (!importNode.css || inlineCSS) {
try {
@@ -63,7 +63,7 @@
this._importer.push(importNode.getPath(), importNode.currentFileInfo, importNode.options, function (e, root, importedAtRoot, fullPath) {
if (e && !e.filename) { e.index = importNode.index; e.filename = importNode.currentFileInfo.filename; }
- if (!env.importMultiple) {
+ if (!env.importMultiple) {
if (importedAtRoot) {
importNode.skip = true;
} else {
@@ -73,7 +73,7 @@
}
importVisitor.onceFileDetectionMap[fullPath] = true;
return false;
- };
+ };
}
}
diff --git a/lib/less/index.js b/lib/less/index.js
index 348a5d8..5d5e01d 100644
--- a/lib/less/index.js
+++ b/lib/less/index.js
@@ -24,7 +24,7 @@ var less = {
var css;
try {
css = root && root.toCSS && root.toCSS(options);
- }
+ }
catch (err) { callback(err); return; }
callback(null, css);
});
@@ -34,7 +34,7 @@ var less = {
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); }
});
});
@@ -143,13 +143,13 @@ less.Parser.fileLoader = function (file, currentFileInfo, callback, env) {
function handleDataAndCallCallback(data) {
var j = file.lastIndexOf('/');
- // 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/../'
if(newFileInfo.relativeUrls && !/^(?:[a-z-]+:|\/)/.test(file) && j != -1) {
var relativeSubDirectory = file.slice(0, j+1);
@@ -160,7 +160,7 @@ less.Parser.fileLoader = function (file, currentFileInfo, callback, env) {
callback(null, data, pathname, newFileInfo);
}
-
+
var isUrl = isUrlRe.test( file );
if (isUrl || isUrlRe.test(currentFileInfo.currentDirectory)) {
if (request === undefined) {
diff --git a/lib/less/parser.js b/lib/less/parser.js
index 9a1bf7e..1471a1a 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -405,8 +405,8 @@ less.Parser = function Parser(env) {
switch (cc) {
case 40: // (
- parenLevel++;
- lastOpeningParen = parserCurrentIndex;
+ parenLevel++;
+ lastOpeningParen = parserCurrentIndex;
continue;
case 41: // )
if (--parenLevel < 0) {
@@ -417,8 +417,8 @@ less.Parser = function Parser(env) {
if (!parenLevel) { emitChunk(); }
continue;
case 123: // {
- level++;
- lastOpening = parserCurrentIndex;
+ level++;
+ lastOpening = parserCurrentIndex;
continue;
case 125: // }
if (--level < 0) {
@@ -517,7 +517,7 @@ less.Parser = function Parser(env) {
var evaldRoot,
css,
evalEnv = new tree.evalEnv(options);
-
+
//
// Allows setting variables with a hash, so:
//
@@ -1038,8 +1038,8 @@ less.Parser = function Parser(env) {
rulesetCall: function () {
var name;
- if (input.charAt(i) === '@' && (name = $re(/^(@[\w-]+)\s*\(\s*\)\s*;/))) {
- return new tree.RulesetCall(name[1]);
+ if (input.charAt(i) === '@' && (name = $re(/^(@[\w-]+)\s*\(\s*\)\s*;/))) {
+ return new tree.RulesetCall(name[1]);
}
},
@@ -1066,7 +1066,7 @@ less.Parser = function Parser(env) {
if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; }
} while($char(","));
-
+
expect(/^\)/);
if (isRule) {
@@ -1082,7 +1082,7 @@ less.Parser = function Parser(env) {
extendRule: function() {
return this.extend(true);
},
-
+
//
// Mixins
//
@@ -1288,7 +1288,7 @@ less.Parser = function Parser(env) {
variadic = argInfo.variadic;
// .mixincall("@{a}");
- // looks a bit like a mixin definition..
+ // looks a bit like a mixin definition..
// also
// .mixincall(@a: {rule: set;});
// so we have to be nice and restore
@@ -1297,7 +1297,7 @@ less.Parser = function Parser(env) {
restore();
return;
}
-
+
parsers.comments();
if ($re(/^when/)) { // Guard
@@ -1404,7 +1404,7 @@ less.Parser = function Parser(env) {
//
combinator: function () {
var c = input.charAt(i);
-
+
if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') {
i++;
if (input.charAt(i) === '^') {
@@ -1497,7 +1497,7 @@ less.Parser = function Parser(env) {
}
return block;
},
-
+
detachedRuleset: function() {
var blockRuleset = this.blockRuleset();
if (blockRuleset) {
@@ -1510,7 +1510,7 @@ less.Parser = function Parser(env) {
//
ruleset: function () {
var selectors, s, rules, debugInfo;
-
+
save();
if (env.dumpLineNumbers) {
@@ -1557,20 +1557,20 @@ less.Parser = function Parser(env) {
name = this.variable() || this.ruleProperty();
if (name) {
isVariable = typeof name === "string";
-
+
if (isVariable) {
value = this.detachedRuleset();
}
-
+
if (!value) {
// prefer to try to parse first if its a variable or we are compressing
// but always fallback on the other one
value = !tryAnonymous && (env.compress || isVariable) ?
(this.value() || this.anonymousValue()) :
(this.anonymousValue() || this.value());
-
+
important = this.important();
-
+
// a name returned by this.ruleProperty() is always an array of the form:
// [string-1, ..., string-n, ""] or [string-1, ..., string-n, "+"]
// where each item is a tree.Keyword or tree.Variable
@@ -1751,7 +1751,7 @@ less.Parser = function Parser(env) {
save();
name = $re(/^@[a-z-]+/);
-
+
if (!name) { return; }
nonVendorSpecificName = name;
@@ -1824,7 +1824,7 @@ less.Parser = function Parser(env) {
if (rules || (!hasBlock && value && $char(';'))) {
forget();
- return new(tree.Directive)(name, value, rules, index, env.currentFileInfo,
+ return new(tree.Directive)(name, value, rules, index, env.currentFileInfo,
env.dumpLineNumbers ? getDebugInfo(index, input, env) : null);
}
@@ -1911,7 +1911,7 @@ less.Parser = function Parser(env) {
if (!a) {
break;
}
-
+
m.parensInOp = true;
a.parensInOp = true;
operation = new(tree.Operation)(op, [operation || m, a], isSpaced);
@@ -2018,7 +2018,7 @@ less.Parser = function Parser(env) {
},
ruleProperty: function () {
var c = current, name = [], index = [], length = 0, s, k;
-
+
function match(re) {
var a = re.exec(c);
if (a) {
@@ -2032,7 +2032,7 @@ less.Parser = function Parser(env) {
match(/^(\*?)/);
while (match(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/)); // !
if ((name.length > 1) && match(/^\s*((?:\+_|\+)?)\s*:/)) {
- // at last, we have the complete match now. move forward,
+ // at last, we have the complete match now. move forward,
// convert name particles to tree objects and return:
skipWhitespace(length);
if (name[0] === '') {
@@ -2043,7 +2043,7 @@ less.Parser = function Parser(env) {
s = name[k];
name[k] = (s.charAt(0) !== '@')
? new(tree.Keyword)(s)
- : new(tree.Variable)('@' + s.slice(2, -1),
+ : new(tree.Variable)('@' + s.slice(2, -1),
index[k], env.currentFileInfo);
}
return name;
diff --git a/lib/less/rhino.js b/lib/less/rhino.js
index 2e4f51c..892b119 100644
--- a/lib/less/rhino.js
+++ b/lib/less/rhino.js
@@ -66,9 +66,9 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
input = readFile(sheetName);
input = input.replace(/^\xEF\xBB\xBF/, '');
-
+
contents[sheetName] = input;
-
+
var parser = new less.Parser({
paths: [sheet.href.replace(/[\w\.-]+$/, '')],
contents: contents
@@ -190,12 +190,12 @@ function writeFile(filename, content) {
args = args.filter(function (arg) {
var match = arg.match(/^-I(.+)$/);
-
+
if (match) {
options.paths.push(match[1]);
return false;
}
-
+
match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=(.*))?$/i);
if (match) { arg = match[1]; } // was (?:=([^\s]*)), check!
else { return arg; }
@@ -373,7 +373,7 @@ function writeFile(filename, content) {
} else if (options.sourceMap) {
options.sourceMapOutputFilename = options.sourceMap;
}
-
+
if (!name) {
console.log("lessc: no inout files");
diff --git a/lib/less/source-map-output.js b/lib/less/source-map-output.js
index 9a090d4..37f5fda 100644
--- a/lib/less/source-map-output.js
+++ b/lib/less/source-map-output.js
@@ -51,7 +51,7 @@
if (fileInfo) {
var inputSource = this._contentsMap[fileInfo.filename];
-
+
// remove vars/banner added to the top of the file
if (this._contentsIgnoredCharsMap[fileInfo.filename]) {
// adjust the index
diff --git a/lib/less/tree/anonymous.js b/lib/less/tree/anonymous.js
index 3cfae77..bd9f32a 100644
--- a/lib/less/tree/anonymous.js
+++ b/lib/less/tree/anonymous.js
@@ -8,21 +8,21 @@ tree.Anonymous = function (string, index, currentFileInfo, mapLines) {
};
tree.Anonymous.prototype = {
type: "Anonymous",
- eval: function () {
+ eval: function () {
return new tree.Anonymous(this.value, this.index, this.currentFileInfo, this.mapLines);
},
compare: function (x) {
if (!x.toCSS) {
return -1;
}
-
+
var left = this.toCSS(),
right = x.toCSS();
-
+
if (left === right) {
return 0;
}
-
+
return left < right ? -1 : 1;
},
genCSS: function (env, output) {
diff --git a/lib/less/tree/call.js b/lib/less/tree/call.js
index aa6acb9..4ee524a 100644
--- a/lib/less/tree/call.js
+++ b/lib/less/tree/call.js
@@ -20,7 +20,7 @@ tree.Call.prototype = {
// When evaluating a function call,
// we either find the function in `tree.functions` [1],
// in which case we call it, passing the evaluated arguments,
- // if this returns null or we cannot find the function, we
+ // if this returns null or we cannot find the function, we
// simply print it out as it appeared originally [2].
//
// The *functions.js* file contains the built-in functions.
diff --git a/lib/less/tree/color.js b/lib/less/tree/color.js
index eac71f7..38f4ff9 100644
--- a/lib/less/tree/color.js
+++ b/lib/less/tree/color.js
@@ -153,7 +153,7 @@ tree.Color.prototype = {
if (!x.rgb) {
return -1;
}
-
+
return (x.rgb[0] === this.rgb[0] &&
x.rgb[1] === this.rgb[1] &&
x.rgb[2] === this.rgb[2] &&
@@ -183,7 +183,7 @@ function toHex(v) {
}
function clamp(v, max) {
- return Math.min(Math.max(v, 0), max);
+ return Math.min(Math.max(v, 0), max);
}
})(require('../tree'));
diff --git a/lib/less/tree/dimension.js b/lib/less/tree/dimension.js
index aecec13..71bf98e 100644
--- a/lib/less/tree/dimension.js
+++ b/lib/less/tree/dimension.js
@@ -91,7 +91,7 @@ tree.Dimension.prototype = {
if (other instanceof tree.Dimension) {
var a, b,
aValue, bValue;
-
+
if (this.unit.isEmpty() || other.unit.isEmpty()) {
a = this;
b = other;
@@ -100,7 +100,7 @@ tree.Dimension.prototype = {
b = other.unify();
if (a.unit.compare(b.unit) !== 0) {
return -1;
- }
+ }
}
aValue = a.value;
bValue = b.value;
diff --git a/lib/less/tree/import.js b/lib/less/tree/import.js
index 7042f04..27b306d 100644
--- a/lib/less/tree/import.js
+++ b/lib/less/tree/import.js
@@ -97,10 +97,10 @@ tree.Import.prototype = {
this.skip = this.skip();
}
if (this.skip) {
- return [];
+ return [];
}
}
-
+
if (this.options.inline) {
//todo needs to reference css file not import
var contents = new(tree.Anonymous)(this.root, 0, {filename: this.importedFilename}, true);
diff --git a/lib/less/tree/media.js b/lib/less/tree/media.js
index 095e43e..0a95bef 100644
--- a/lib/less/tree/media.js
+++ b/lib/less/tree/media.js
@@ -31,7 +31,7 @@ tree.Media.prototype = {
env.mediaBlocks = [];
env.mediaPath = [];
}
-
+
var media = new(tree.Media)(null, [], this.index, this.currentFileInfo);
if(this.debugInfo) {
this.rules[0].debugInfo = this.debugInfo;
@@ -50,14 +50,14 @@ tree.Media.prototype = {
env.strictMath = false;
}
}
-
+
env.mediaPath.push(media);
env.mediaBlocks.push(media);
-
+
env.frames.unshift(this.rules[0]);
media.rules = [this.rules[0].eval(env)];
env.frames.shift();
-
+
env.mediaPath.pop();
return env.mediaPath.length === 0 ? media.evalTop(env) :
@@ -66,7 +66,7 @@ tree.Media.prototype = {
variable: function (name) { return tree.Ruleset.prototype.variable.call(this.rules[0], name); },
find: function () { return tree.Ruleset.prototype.find.apply(this.rules[0], arguments); },
rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this.rules[0]); },
- emptySelectors: function() {
+ emptySelectors: function() {
var el = new(tree.Element)('', '&', this.index, this.currentFileInfo),
sels = [new(tree.Selector)([el], null, null, this.index, this.currentFileInfo)];
sels[0].mediaEmpty = true;
diff --git a/lib/less/tree/mixin.js b/lib/less/tree/mixin.js
index 506561b..4bd66e3 100644
--- a/lib/less/tree/mixin.js
+++ b/lib/less/tree/mixin.js
@@ -21,7 +21,7 @@ tree.mixin.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) };
@@ -30,12 +30,12 @@ tree.mixin.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;
@@ -48,11 +48,11 @@ tree.mixin.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);
@@ -64,16 +64,16 @@ tree.mixin.Call.prototype = {
}
candidates.push(candidate);
- }
+ }
}
else {
candidates.push(candidate);
}
-
+
match = true;
}
}
-
+
defaultFunc.reset();
count = [0, 0, 0];
@@ -92,7 +92,7 @@ tree.mixin.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)) {
@@ -109,7 +109,7 @@ tree.mixin.Call.prototype = {
}
}
}
-
+
if (match) {
if (!this.currentFileInfo || !this.currentFileInfo.reference) {
for (i = 0; i < rules.length; i++) {
@@ -242,7 +242,7 @@ tree.mixin.Definition.prototype = {
throw { type: 'Runtime', message: "wrong number of arguments for " + this.name +
' (' + argsLength + ' for ' + this.arity + ')' };
}
-
+
frame.prependRule(new(tree.Rule)(name, val));
evaldArguments[i] = val;
}
diff --git a/lib/less/tree/quoted.js b/lib/less/tree/quoted.js
index 131bfad..208a642 100644
--- a/lib/less/tree/quoted.js
+++ b/lib/less/tree/quoted.js
@@ -33,14 +33,14 @@ tree.Quoted.prototype = {
if (!x.toCSS) {
return -1;
}
-
+
var left = this.toCSS(),
right = x.toCSS();
-
+
if (left === right) {
return 0;
}
-
+
return left < right ? -1 : 1;
}
};
diff --git a/lib/less/tree/rule.js b/lib/less/tree/rule.js
index 4e1ccde..6790b3b 100644
--- a/lib/less/tree/rule.js
+++ b/lib/less/tree/rule.js
@@ -34,7 +34,7 @@ tree.Rule.prototype = {
if (typeof name !== "string") {
// expand 'primitive' name directly to get
// things faster (~10% for benchmark.less):
- name = (name.length === 1)
+ name = (name.length === 1)
&& (name[0] instanceof tree.Keyword)
? name[0].value : evalName(env, name);
}
@@ -44,7 +44,7 @@ tree.Rule.prototype = {
}
try {
evaldValue = this.value.eval(env);
-
+
if (!this.variable && evaldValue.type === "DetachedRuleset") {
throw { message: "Rulesets cannot be evaluated on a property.",
index: this.index, filename: this.currentFileInfo.filename };
diff --git a/lib/less/tree/ruleset.js b/lib/less/tree/ruleset.js
index 1902300..86b6100 100644
--- a/lib/less/tree/ruleset.js
+++ b/lib/less/tree/ruleset.js
@@ -19,14 +19,14 @@ tree.Ruleset.prototype = {
}
},
eval: function (env) {
- var thisSelectors = this.selectors, selectors,
+ var thisSelectors = this.selectors, selectors,
selCnt, selector, i, defaultFunc = tree.defaultFunc, hasOnePassingSelector = false;
if (thisSelectors && (selCnt = thisSelectors.length)) {
selectors = [];
defaultFunc.error({
- type: "Syntax",
- message: "it is currently only allowed in parametric mixin guards,"
+ type: "Syntax",
+ message: "it is currently only allowed in parametric mixin guards,"
});
for (i = 0; i < selCnt; i++) {
selector = thisSelectors[i].eval(env);
@@ -35,7 +35,7 @@ tree.Ruleset.prototype = {
hasOnePassingSelector = true;
}
}
- defaultFunc.reset();
+ defaultFunc.reset();
} else {
hasOnePassingSelector = true;
}
@@ -52,7 +52,7 @@ tree.Ruleset.prototype = {
if(this.debugInfo) {
ruleset.debugInfo = this.debugInfo;
}
-
+
if (!hasOnePassingSelector) {
rules.length = 0;
}
@@ -124,7 +124,7 @@ tree.Ruleset.prototype = {
rsRules[i] = rule = rule.eval ? rule.eval(env) : rule;
}
}
-
+
// Evaluate everything else
for (i = 0; i < rsRules.length; i++) {
rule = rsRules[i];
@@ -147,7 +147,7 @@ tree.Ruleset.prototype = {
// Pop the stack
envFrames.shift();
envSelectors.shift();
-
+
if (env.mediaBlocks) {
for (i = mediaBlockCount; i < env.mediaBlocks.length; i++) {
env.mediaBlocks[i].bubbleSelectors(selectors);
@@ -387,19 +387,19 @@ tree.Ruleset.prototype = {
joinSelector: function (paths, context, selector) {
- var i, j, k,
- hasParentSelector, newSelectors, el, sel, parentSel,
- newSelectorPath, afterParentJoin, newJoinedSelector,
+ var i, j, k,
+ hasParentSelector, newSelectors, el, sel, parentSel,
+ newSelectorPath, afterParentJoin, newJoinedSelector,
newJoinedSelectorEmpty, lastSelector, currentElements,
selectorsMultiplied;
-
+
for (i = 0; i < selector.elements.length; i++) {
el = selector.elements[i];
if (el.value === '&') {
hasParentSelector = true;
}
}
-
+
if (!hasParentSelector) {
if (context.length > 0) {
for (i = 0; i < context.length; i++) {
@@ -529,7 +529,7 @@ tree.Ruleset.prototype = {
}
}
},
-
+
mergeElementsOnToSelectors: function(elements, selectors) {
var i, sel;
diff --git a/lib/less/tree/selector.js b/lib/less/tree/selector.js
index f38934e..6ebedf2 100644
--- a/lib/less/tree/selector.js
+++ b/lib/less/tree/selector.js
@@ -87,9 +87,9 @@ tree.Selector.prototype = {
}
},
isJustParentSelector: function() {
- return !this.mediaEmpty &&
- this.elements.length === 1 &&
- this.elements[0].value === '&' &&
+ return !this.mediaEmpty &&
+ this.elements.length === 1 &&
+ this.elements[0].value === '&' &&
(this.elements[0].combinator.value === ' ' || this.elements[0].combinator.value === '');
},
eval: function (env) {
diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js
index 9056268..3fd0a21 100644
--- a/lib/less/tree/url.js
+++ b/lib/less/tree/url.js
@@ -29,7 +29,7 @@ tree.URL.prototype = {
}
val.value = rootpath + val.value;
}
-
+
val.value = ctx.normalizePath(val.value);
// Add url args if enabled
diff --git a/lib/less/tree/variable.js b/lib/less/tree/variable.js
index 90d8627..94795a8 100644
--- a/lib/less/tree/variable.js
+++ b/lib/less/tree/variable.js
@@ -13,14 +13,14 @@ tree.Variable.prototype = {
if (name.indexOf('@@') === 0) {
name = '@' + new(tree.Variable)(name.slice(1)).eval(env).value;
}
-
+
if (this.evaluating) {
throw { type: 'Name',
message: "Recursive variable definition for " + name,
filename: this.currentFileInfo.file,
index: this.index };
}
-
+
this.evaluating = true;
variable = tree.find(env.frames, function (frame) {
@@ -29,7 +29,7 @@ tree.Variable.prototype = {
return v.value.eval(env);
}
});
- if (variable) {
+ if (variable) {
this.evaluating = false;
return variable;
} else {
diff --git a/lib/source-map/source-map-footer.js b/lib/source-map/source-map-footer.js
index bb7dcb9..71e1ed8 100644
--- a/lib/source-map/source-map-footer.js
+++ b/lib/source-map/source-map-footer.js
@@ -1,4 +1,4 @@
// footer to wrap "source-map" module
- return this.sourceMap;
- }();
+ return this.sourceMap;
+ }();
})();
\ No newline at end of file
diff --git a/lib/source-map/source-map-header.js b/lib/source-map/source-map-header.js
index d2f3cff..4432b43 100644
--- a/lib/source-map/source-map-header.js
+++ b/lib/source-map/source-map-header.js
@@ -1,3 +1,3 @@
// wraps the source-map code in a less module
(function() {
- less.modules["source-map"] = function() {
+ less.modules["source-map"] = function() {
diff --git a/test/browser/jasmine.js b/test/browser/jasmine.js
index 6b3459b..019efdb 100644
--- a/test/browser/jasmine.js
+++ b/test/browser/jasmine.js
@@ -1100,7 +1100,7 @@ jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
type: isSuite ? 'suite' : 'spec',
children: []
};
-
+
if (isSuite) {
var children = suiteOrSpec.children();
for (var i = 0; i < children.length; i++) {
@@ -1326,11 +1326,11 @@ jasmine.Matchers.prototype.toBeNull = function() {
* Matcher that compares the actual to NaN.
*/
jasmine.Matchers.prototype.toBeNaN = function() {
- this.message = function() {
- return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ];
- };
+ this.message = function() {
+ return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ];
+ };
- return (this.actual !== this.actual);
+ return (this.actual !== this.actual);
};
/**
@@ -1929,7 +1929,7 @@ jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
for (var property in obj) {
if (!obj.hasOwnProperty(property)) continue;
if (property == '__Jasmine_been_here_before__') continue;
- fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined &&
+ fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined &&
obj.__lookupGetter__(property) !== null) : false);
}
};
@@ -2061,7 +2061,7 @@ jasmine.Queue.prototype.next_ = function() {
while (goAgain) {
goAgain = false;
-
+
if (self.index < self.blocks.length && !(this.abort && !this.ensured[self.index])) {
var calledSynchronously = true;
var completedSynchronously = false;
@@ -2099,7 +2099,7 @@ jasmine.Queue.prototype.next_ = function() {
if (completedSynchronously) {
onComplete();
}
-
+
} else {
self.running = false;
if (self.onComplete) {
diff --git a/test/index.js b/test/index.js
index 33e7963..ab28110 100644
--- a/test/index.js
+++ b/test/index.js
@@ -30,12 +30,12 @@ lessTester.runTestSet({strictMath: true, relativeUrls: false, rootpath: "folder
lessTester.runTestSet({strictMath: true, compress: true}, "compression/");
lessTester.runTestSet({}, "legacy/");
lessTester.runTestSet({strictMath: true, strictUnits: true, sourceMap: true, globalVars: true }, "sourcemaps/",
- lessTester.testSourcemap, null, null,
- function(filename, type) {
+ lessTester.testSourcemap, null, null,
+ function(filename, type) {
if (type === "vars") {
return path.join('test/less/', filename) + '.json';
}
- return path.join('test/sourcemaps', filename) + '.json';
+ return path.join('test/sourcemaps', filename) + '.json';
});
lessTester.runTestSet({globalVars: true, banner: "/**\n * Test\n */\n"}, "globalVars/",
null, null, null, function(name) { return path.join('test/less/', name) + '.json'; });
diff --git a/test/less/colors.less b/test/less/colors.less
index 7abda4e..061ebc8 100644
--- a/test/less/colors.less
+++ b/test/less/colors.less
@@ -37,7 +37,7 @@
.b { color: (#eee + #fff); } // #ffffff
.c { color: (#aaa * 3); } // #ffffff
.d { color: (#00ee00 + #009900); } // #00ff00
- .e { color: rgba(-99.9, 31.4159, 321, 0.42); }
+ .e { color: rgba(-99.9, 31.4159, 321, 0.42); }
}
#grey {
diff --git a/test/less/comments.less b/test/less/comments.less
index 7859911..e2569b6 100644
--- a/test/less/comments.less
+++ b/test/less/comments.less
@@ -69,11 +69,11 @@
.mixin_def_with_colors(@a: white, // in
@b: 1px //put in @b - causes problems! --->
- ) // the
- when (@a = white) {
- .test {
- color: @b;
- }
+ ) // the
+ when (@a = white) {
+ .test {
+ color: @b;
+ }
}
.mixin_def_with_colors();
diff --git a/test/less/css-escapes.less b/test/less/css-escapes.less
index 6a4b283..697503a 100644
--- a/test/less/css-escapes.less
+++ b/test/less/css-escapes.less
@@ -1,30 +1,30 @@
@ugly: fuchsia;
.escape\|random\|char {
- color: red;
+ color: red;
}
.mixin\!tUp {
- font-weight: bold;
+ font-weight: bold;
}
// class="404"
.\34 04 {
- background: red;
-
- strong {
- color: @ugly;
- .mixin\!tUp;
- }
+ background: red;
+
+ strong {
+ color: @ugly;
+ .mixin\!tUp;
+ }
}
.trailingTest\+ {
- color: red;
+ color: red;
}
/* This hideous test of hideousness checks for the selector "blockquote" with various permutations of hex escapes */
\62\6c\6f \63 \6B \0071 \000075o\74 e {
- color: silver;
+ color: silver;
}
[ng\:cloak],
diff --git a/test/less/css.less b/test/less/css.less
index 766bdd4..0cdebae 100644
--- a/test/less/css.less
+++ b/test/less/css.less
@@ -82,7 +82,7 @@ p + h1 {
background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue));
margin: ;
.nested-multiple {
- multiple-semi-colons: yes;;;;;;
+ multiple-semi-colons: yes;;;;;;
};
filter: alpha(opacity=100);
width: auto\9;
diff --git a/test/less/errors/import-missing.less b/test/less/errors/import-missing.less
index 5ce8e4d..a8046af 100644
--- a/test/less/errors/import-missing.less
+++ b/test/less/errors/import-missing.less
@@ -1,6 +1,6 @@
.a {
color: green;
- // tests line number for import reference is correct
+ // tests line number for import reference is correct
}
@import "file-does-not-exist.less";
\ No newline at end of file
diff --git a/test/less/extend-selector.less b/test/less/extend-selector.less
index c7588ee..1bdf6d7 100644
--- a/test/less/extend-selector.less
+++ b/test/less/extend-selector.less
@@ -37,7 +37,7 @@ div.ext5,
.ext {
test: 1;
}
-// same as
+// same as
// .a .c:extend(.ext all)
// .b .c:extend(.ext all)
// .a .c .d
diff --git a/test/less/extract-and-length.less b/test/less/extract-and-length.less
index d81e118..8b1901c 100644
--- a/test/less/extract-and-length.less
+++ b/test/less/extract-and-length.less
@@ -26,7 +26,7 @@
color-value: extract(blue, 1);
rgba-value: extract(rgba(80, 160, 240, 0.67), 1);
empty-value: extract(~'', 1);
-
+
name-length: length(name);
string-length: length("string");
number-length: length(12345678);
@@ -48,7 +48,7 @@
}
}
-.mixin-args(...) {
+.mixin-args(...) {
&-2 {
length: length(@arguments);
extract: extract(@arguments, 3) ~"|" extract(@arguments, 2) ~"|" extract(@arguments, 1);
@@ -90,7 +90,7 @@
extract-1: extract(@v, 2);
length-2: length(extract(@v, 2));
extract-2: extract(extract(@v, 2), 2);
-
+
&-as-args {.mixin-args(@a, @b, @c)}
}
@@ -111,17 +111,17 @@
@a: a b c d, 1 2 3 4;
@b: 5 6 7 8, e f g h;
.3D(@a, @b);
-
+
.3D(...) {
@v1: @arguments;
length-1: length(@v1);
extract-1: extract(@v1, 1);
-
+
@v2: extract(@v1, 2);
length-2: length(@v2);
extract-2: extract(@v2, 1);
-
+
@v3: extract(@v2, 1);
length-3: length(@v3);
extract-3: extract(@v3, 3);
diff --git a/test/less/functions.less b/test/less/functions.less
index 4b4720d..2712ee4 100644
--- a/test/less/functions.less
+++ b/test/less/functions.less
@@ -67,11 +67,11 @@
format-single-quoted: %('hello %s', "single world");
format-escaped-string: %(~"hello %s", "escaped world");
eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64));
-
+
unitless: unit(12px);
unit: unit((13px + 1px), em);
unitpercentage: unit(100, %);
-
+
get-unit: get-unit(10px);
get-unit-empty: get-unit(10);
@@ -123,7 +123,7 @@
fade-out: fadeOut(red, 5%); // support fadeOut and fadeout
fade-in: fadein(fadeout(red, 10%), 5%);
-
+
hsv: hsv(5, 50%, 30%);
hsva: hsva(3, 50%, 30%, 0.2);
diff --git a/test/less/globalVars/simple.json b/test/less/globalVars/simple.json
index 76a63c5..2bccdc5 100644
--- a/test/less/globalVars/simple.json
+++ b/test/less/globalVars/simple.json
@@ -1,3 +1,3 @@
{
- "my-color": "red"
+ "my-color": "red"
}
\ No newline at end of file
diff --git a/test/less/import/imports/font.less b/test/less/import/imports/font.less
index 5abb7e7..822279f 100644
--- a/test/less/import/imports/font.less
+++ b/test/less/import/imports/font.less
@@ -1,8 +1,8 @@
@font-face {
- font-family: xecret;
- src: url('../assets/xecret.ttf');
+ font-family: xecret;
+ src: url('../assets/xecret.ttf');
}
#secret {
- font-family: xecret, sans-serif;
+ font-family: xecret, sans-serif;
}
diff --git a/test/less/media.less b/test/less/media.less
index 01a6a02..8bd23bb 100644
--- a/test/less/media.less
+++ b/test/less/media.less
@@ -126,7 +126,7 @@ body {
}
@page :first {
size: 8.5in 11in;
- @top-left {
+ @top-left {
margin: 1cm;
}
@top-left-corner {
@@ -197,7 +197,7 @@ body {
@bpMedium: 1000px;
@media (max-width: @bpMedium) {
- body {
+ body {
.bg();
background: blue;
}
diff --git a/test/less/merge.less b/test/less/merge.less
index 5b5def3..a902ab9 100644
--- a/test/less/merge.less
+++ b/test/less/merge.less
@@ -41,7 +41,7 @@
.fifth-transform();
}
.test5 {
- // Wont merge values from mixins that merked as !important, for backwards compatibility with css
+ // Wont merge values from mixins that merked as !important, for backwards compatibility with css
.first-transform();
.second-transform() !important;
}
diff --git a/test/less/mixins-closure.less b/test/less/mixins-closure.less
index 01251d2..26c8b6e 100644
--- a/test/less/mixins-closure.less
+++ b/test/less/mixins-closure.less
@@ -17,10 +17,10 @@
.nested {
@var: 5px;
.mixin () {
- width: @var;
+ width: @var;
}
.class {
- @var: 10px;
- .mixin;
- }
+ @var: 10px;
+ .mixin;
+ }
}
diff --git a/test/less/mixins-guards-default-func.less b/test/less/mixins-guards-default-func.less
index eada938..a71f78f 100644
--- a/test/less/mixins-guards-default-func.less
+++ b/test/less/mixins-guards-default-func.less
@@ -46,7 +46,7 @@ guard-default-definition-order {
guard-default-out-of-guard {
.m(1) {case-1: 1}
.m(@x: default()) when (default()) {default: @x}
-
+
&-0 {
case-0: default();
.m(1);
@@ -153,7 +153,7 @@ guard-default-multi-4 {
.m(@x) when (default()), not(default()) {always: @x}
.m(@x) when (default()) and not(default()) {never: @x}
.m(2) {case: 2}
-
+
.m(1);
.m(2);
}
@@ -186,7 +186,7 @@ guard-default-scopes {
.s3();
.m(false);
}
-
+
&-1 {
.s1();
.s3();
diff --git a/test/less/mixins-guards.less b/test/less/mixins-guards.less
index 6a02067..47c3312 100644
--- a/test/less/mixins-guards.less
+++ b/test/less/mixins-guards.less
@@ -107,23 +107,23 @@
.equality-unit-test(2px);
}
-.colorguard(@col) when (@col = red) { content: is @col; }
-.colorguard(@col) when not (blue = @col) { content: is not blue its @col; }
-.colorguard(@col) {}
+.colorguard(@col) when (@col = red) { content: is @col; }
+.colorguard(@col) when not (blue = @col) { content: is not blue its @col; }
+.colorguard(@col) {}
.colorguardtest {
.colorguard(red);
- .colorguard(blue);
- .colorguard(purple);
+ .colorguard(blue);
+ .colorguard(purple);
}
-.stringguard(@str) when (@str = "theme1") { content: is theme1; }
-.stringguard(@str) when not ("theme2" = @str) { content: is not theme2; }
-.stringguard(@str) when (~"theme1" = @str) { content: is theme1 no quotes; }
-.stringguard(@str) {}
+.stringguard(@str) when (@str = "theme1") { content: is theme1; }
+.stringguard(@str) when not ("theme2" = @str) { content: is not theme2; }
+.stringguard(@str) when (~"theme1" = @str) { content: is theme1 no quotes; }
+.stringguard(@str) {}
.stringguardtest {
.stringguard("theme1");
- .stringguard("theme2");
- .stringguard(theme1);
+ .stringguard("theme2");
+ .stringguard(theme1);
}
.mixin(...) {
diff --git a/test/less/mixins-important.less b/test/less/mixins-important.less
index c8cc1d5..5014e81 100644
--- a/test/less/mixins-important.less
+++ b/test/less/mixins-important.less
@@ -2,7 +2,7 @@
border-width: @a;
}
.mixin (9) {
- border: 9 !important;
+ border: 9 !important;
}
.mixin (@a: 0) {
border: @a;
diff --git a/test/less/mixins-named-args.less b/test/less/mixins-named-args.less
index d79e0f4..196f2ac 100644
--- a/test/less/mixins-named-args.less
+++ b/test/less/mixins-named-args.less
@@ -6,12 +6,12 @@
.mixin (@a: 1px, @b: 50%) when (@b > 75%){
text-align: center;
}
-
+
.named-arg {
color: blue;
.mixin(@b: 100%);
}
-
+
.class {
@var: 20%;
.mixin(@b: @var);
diff --git a/test/less/mixins-nested.less b/test/less/mixins-nested.less
index 43443de..cc741a1 100644
--- a/test/less/mixins-nested.less
+++ b/test/less/mixins-nested.less
@@ -7,9 +7,9 @@
height: (@a * 10);
.innest {
- width: @a;
+ width: @a;
.mix-inner((@a * 2));
- }
+ }
}
}
diff --git a/test/less/mixins.less b/test/less/mixins.less
index be9e2bb..a94c3a6 100644
--- a/test/less/mixins.less
+++ b/test/less/mixins.less
@@ -125,7 +125,7 @@ h3 { .margin_between(15px, 5px); }
}
.paddingFloat(@padding) { padding-left: @padding; }
-.button {
+.button {
.paddingFloat(((10px + 12) * 2));
&.large { .paddingFloat(((10em * 2) * 2)); }
diff --git a/test/less/property-name-interp.less b/test/less/property-name-interp.less
index 9886e65..a4e5b5c 100644
--- a/test/less/property-name-interp.less
+++ b/test/less/property-name-interp.less
@@ -6,7 +6,7 @@ pi-test {
@c_c: left;
@d-d4: radius;
@-: -;
-
+
@{a}: 0;
@{prefix}width: 50%;
*-z-@{a} :1px dashed blue;
@@ -34,7 +34,7 @@ pi-test {
pre-property-@{suffix} +: middle;
@{prefix}-property-@{suffix}+: low;
@{prefix}-property-@{p} + : @v;
-
+
@subterfuge: ~'+';
pre-property-ish@{subterfuge}: nice try dude;
}
diff --git a/test/less/scope.less b/test/less/scope.less
index 475b1f6..13d01a1 100644
--- a/test/less/scope.less
+++ b/test/less/scope.less
@@ -37,7 +37,7 @@
@local-will-be-made-global: green;
.scope {
scoped-val: @local-will-be-made-global;
- }
+ }
}
}
diff --git a/test/less/selectors.less b/test/less/selectors.less
index 8b30546..e641847 100644
--- a/test/less/selectors.less
+++ b/test/less/selectors.less
@@ -41,9 +41,9 @@ a {
.qux & {
display: inline;
}
- .qux& {
- display: inline-block;
- }
+ .qux& {
+ display: inline-block;
+ }
.qux & .biz {
display: none;
}
@@ -123,7 +123,7 @@ a {
}
@num: 3;
:nth-child(@{num}) {
- selector: interpolated;
+ selector: interpolated;
}
.test {
&:nth-child(odd):not(:nth-child(3)) {
diff --git a/test/less/sourcemaps/basic.json b/test/less/sourcemaps/basic.json
index 76a63c5..2bccdc5 100644
--- a/test/less/sourcemaps/basic.json
+++ b/test/less/sourcemaps/basic.json
@@ -1,3 +1,3 @@
{
- "my-color": "red"
+ "my-color": "red"
}
\ No newline at end of file
diff --git a/test/less/variables.less b/test/less/variables.less
index e896f40..8674a37 100644
--- a/test/less/variables.less
+++ b/test/less/variables.less
@@ -27,17 +27,17 @@
.redef {
@var: 0;
- .inition {
- @var: 4;
- @var: 2;
- three: @var;
- @var: 3;
- }
- zero: @var;
+ .inition {
+ @var: 4;
+ @var: 2;
+ three: @var;
+ @var: 3;
+ }
+ zero: @var;
}
.values {
- minus-one: @var;
+ minus-one: @var;
@a: 'Trebuchet';
@multi: 'A', B, C;
font-family: @a, @a, @a;
@@ -62,8 +62,8 @@
.testPollution {
@a: 'no-pollution';
a: @a;
- .polluteMixin();
- a: @a;
+ .polluteMixin();
+ a: @a;
}
.units {
diff --git a/test/less/whitespace.less b/test/less/whitespace.less
index ab4804d..050ac73 100644
--- a/test/less/whitespace.less
+++ b/test/less/whitespace.less
@@ -1,8 +1,8 @@
.whitespace
- { color: white; }
-
+ { color: white; }
+
.whitespace
{
color: white;
@@ -10,7 +10,7 @@
.whitespace
{ color: white; }
-.whitespace{color:white;}
+.whitespace{color:white;}
.whitespace { color : white ; }
.white,
@@ -33,10 +33,10 @@
black;
}
.empty {
-
+
}
.sel
-.newline_ws .tab_ws {
+.newline_ws .tab_ws {
color:
white;
background-position: 45
--
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