Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 4f099330ae4a63637ca5750fece0fb55ffe50a63 1 parent 06debca
TJ Holowaychuk authored

Showing 2 changed files with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/parser.js
  2. +1 0  test/jade.test.js
2  lib/parser.js
@@ -611,7 +611,7 @@ Parser.prototype = {
611 611 case ':':
612 612 this.advance();
613 613 tag.block = new nodes.Block;
614   - tag.block.push(this.parseTag());
  614 + tag.block.push(this.parseExpr());
615 615 break;
616 616 }
617 617
1  test/jade.test.js
@@ -117,6 +117,7 @@ module.exports = {
117 117 'test block-expansion': function(){
118 118 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"));
119 119 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"));
  120 + assert.equal('<div class="foo"><div class="bar">baz</div></div>', render(".foo: .bar baz"));
120 121 },
121 122
122 123 'test case statement': function(){

0 comments on commit 4f09933

Please sign in to comment.
Something went wrong with that request. Please try again.