pass a context to directive(), so it can parse a block

This commit is contained in:
cloudhead
2010-02-25 21:28:14 -05:00
parent 5038b215fc
commit cc1b5a91c3

View File

@@ -159,8 +159,8 @@ less.parser = {
var node;
while (node = $(this.ruleset, []) || $(this.rule) || $(this.mixin.definition, []) ||
$(this.mixin.call) || $(/\/\*([^*]|\*+[^\/*])*\*+\//g) || $(/\/\/.*/g) ||
$(/[\n\s]+/g) || $(this.directive)) {
$(this.mixin.call) || $(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g) || $(/\/\/.*/g) ||
$(/[\n\s]+/g) || $(this.directive, [])) {
root.push(node);
}
return root;