Skip to content

Commit

Permalink
Support complete selector syntax for mixins. Fixes #1048
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Nov 27, 2012
1 parent 5dc7ff5 commit 70241ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/less/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 70241ef

Please sign in to comment.