Permalink
Browse files

yield support for Liquid

  • Loading branch information...
1 parent 6518ccd commit 1cb1ea065dd5d2c3d6b6c62a56480d3ab650df00 bry4n committed Dec 7, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/tilt.rb
View
@@ -375,7 +375,8 @@ def evaluate(scope, locals, &block)
locals = scope.merge(locals)
end
# TODO: Is it possible to lazy yield ?
- # locals['yield'] = promise{ block.call } if block_given?
+ locals['yield'] = block.nil? ? '' : yield
+ locals['content'] = block.nil? ? '' : yield
@engine.render(locals)
end
end

0 comments on commit 1cb1ea0

Please sign in to comment.