Skip to content

Commit e4da34d

Browse files
committed
fix less#31
1 parent afd599d commit e4da34d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/less/parser.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -810,21 +810,21 @@ less.Parser = function Parser(env) {
810810

811811
if (c === '>' || c === '+' || c === '~') {
812812
i++;
813-
while (input.charAt(i) === ' ') { i++ }
813+
while (input.charAt(i).match(/\s/)) { i++ }
814814
return new(tree.Combinator)(c);
815815
} else if (c === '&') {
816816
match = '&';
817817
i++;
818-
if(input.charAt(i) === ' ') {
818+
if(input.charAt(i).match(/\s/)) {
819819
match = '& ';
820820
}
821-
while (input.charAt(i) === ' ') { i++ }
821+
while (input.charAt(i).match(/\s/)) { i++ }
822822
return new(tree.Combinator)(match);
823823
} else if (c === ':' && input.charAt(i + 1) === ':') {
824824
i += 2;
825-
while (input.charAt(i) === ' ') { i++ }
825+
while (input.charAt(i).match(/\s/)) { i++ }
826826
return new(tree.Combinator)('::');
827-
} else if (input.charAt(i - 1) === ' ') {
827+
} else if (input.charAt(i - 1).match(/\s/)) {
828828
return new(tree.Combinator)(" ");
829829
} else {
830830
return new(tree.Combinator)(null);

0 commit comments

Comments
 (0)