Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix include yields. Closes #770

  • Loading branch information...
commit 454975f666eccf420f8205b3483f34a9ba62492a 1 parent 7a48ace
@tj tj authored
View
1  lib/nodes/block.js
@@ -99,6 +99,7 @@ Block.prototype.includeBlock = function(){
else if (node.textOnly) continue;
else if (node.includeBlock) ret = node.includeBlock();
else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock();
+ if (ret.yield) return ret;
}
return ret;
View
10 test/cases/auxiliary/yield-nested.jade
@@ -0,0 +1,10 @@
+html
+ head
+ title
+ body
+ h1 Page
+ #content
+ #content-wrapper
+ yield
+ #footer
+ stuff
View
17 test/cases/include.yield.nested.html
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <h1>Page</h1>
+ <div id="content">
+ <div id="content-wrapper">
+ <p>some content</p>
+ <p>and some more</p>
+ </div>
+ </div>
+ <div id="footer">
+ <stuff></stuff>
+ </div>
+ </body>
+</html>
View
4 test/cases/include.yield.nested.jade
@@ -0,0 +1,4 @@
+
+include auxiliary/yield-nested
+ p some content
+ p and some more
Please sign in to comment.
Something went wrong with that request. Please try again.