Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support complete selector syntax for mixins. Fixes #1048

  • Loading branch information...
commit 70241ef1846952faa25891349bf87b1613abb03d 1 parent 5dc7ff5
@adrianheine adrianheine authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/less/parser.js
View
10 lib/less/parser.js
@@ -818,14 +818,14 @@ less.Parser = function Parser(env) {
call: function () {
var elements = [], e, c, argsSemiColon = [], argsComma = [], args, delim, arg, nameLoop, expressions, isSemiColonSeperated, expressionContainsNamed, index = i, s = input.charAt(i), name, value, important = false;
- if (s !== '.' && s !== '#') { return }
-
save(); // stop us absorbing part of an invalid selector
- while (e = $(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)) {
- elements.push(new(tree.Element)(c, e, i));
- c = $('>');
+ while (e = $(this.element)) {
+ c = input.charAt(i);
+ elements.push(e);
+ if (c === '(' || c === '!') { break }
}
+
if ($('(')) {
expressions = [];
while (arg = $(this.expression)) {
Please sign in to comment.
Something went wrong with that request. Please try again.