[Pkg-javascript-commits] [less.js] 08/25: Raise error in case of an empty selector inside :extend.

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


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

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

commit d44a524b92a462dec0e66c504fc89fc013082a84
Author: jurcovicovam <meri at meri.org>
Date:   Fri Jul 25 22:35:51 2014 +0200

    Raise error in case of an empty selector inside :extend.
---
 lib/less/parser.js         | 3 ++-
 test/sourcemaps/basic.json | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/less/parser.js b/lib/less/parser.js
index d3c6ce6..3775b8f 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -1066,7 +1066,8 @@ less.Parser = function Parser(env) {
                     }
 
                     option = option && option[1];
-
+                    if (!elements)
+                        error("Missing target selector for :extend().");
                     extend = new(tree.Extend)(new(tree.Selector)(elements), option, index);
                     if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; }
 
diff --git a/test/sourcemaps/basic.json b/test/sourcemaps/basic.json
index ab73305..24d5ce2 100644
--- a/test/sourcemaps/basic.json
+++ b/test/sourcemaps/basic.json
@@ -1 +1 @@
-{"version":3,"file":"sourcemaps/basic.css","sources":["testweb/sourcemaps/imported.css","testweb/sourcemaps/basic.less"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACAA;EACE,YAAA;EAJA,UAAA;EAWA,iBAAA;EALA,WAAA;EACA,mBAAA;;AAJF,EASE;AATF,EASM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAEF,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFA;EAGA,UAAA;;AALN;AAAI;AAUJ;EATE,iBAAA;;AADF,EAEE;AAFE,EAEF;AAFF,EAEM;AAFF,EAEE;AAQN,OARE;AAQF,OARM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAE [...]
\ No newline at end of file
+{"version":3,"sources":["testweb/sourcemaps/imported.css","testweb/sourcemaps/basic.less"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACAA;EACE,YAAA;EAJA,UAAA;EAWA,iBAAA;EALA,WAAA;EACA,mBAAA;;AAJF,EASE;AATF,EASM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAEF,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFA;EAGA,UAAA;;AALN;AAAI;AAUJ;EATE,iBAAA;;AADF,EAEE;AAFE,EAEF;AAFF,EAEM;AAFF,EAEE;AAQN,OARE;AAQF,OARM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAE [...]
\ No newline at end of file

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