Permalink
Browse files

Fixed block-expansion with .foo and #foo short-hands. Closes #498

  • Loading branch information...
1 parent 06debca commit 4f099330ae4a63637ca5750fece0fb55ffe50a63 @tj tj committed Feb 17, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/parser.js
  2. +1 −0 test/jade.test.js
View
2 lib/parser.js
@@ -611,7 +611,7 @@ Parser.prototype = {
case ':':
this.advance();
tag.block = new nodes.Block;
- tag.block.push(this.parseTag());
+ tag.block.push(this.parseExpr());
break;
}
View
1 test/jade.test.js
@@ -117,6 +117,7 @@ module.exports = {
'test block-expansion': function(){
assert.equal("<li><a>foo</a></li><li><a>bar</a></li><li><a>baz</a></li>", render("li: a foo\nli: a bar\nli: a baz"));
assert.equal("<li class=\"first\"><a>foo</a></li><li><a>bar</a></li><li><a>baz</a></li>", render("li.first: a foo\nli: a bar\nli: a baz"));
+ assert.equal('<div class="foo"><div class="bar">baz</div></div>', render(".foo: .bar baz"));
},
'test case statement': function(){

0 comments on commit 4f09933

Please sign in to comment.