Skip to content
This repository
Browse code

yield support for Liquid

  • Loading branch information...
commit 1cb1ea065dd5d2c3d6b6c62a56480d3ab650df00 1 parent 6518ccd
authored

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

  1. 3  lib/tilt.rb
3  lib/tilt.rb
@@ -375,7 +375,8 @@ def evaluate(scope, locals, &block)
375 375
         locals = scope.merge(locals)
376 376
       end
377 377
       # TODO: Is it possible to lazy yield ?
378  
-      # locals['yield'] = promise{ block.call } if block_given?
  378
+      locals['yield'] = block.nil? ? '' : yield
  379
+      locals['content'] = block.nil? ? '' : yield
379 380
       @engine.render(locals)
380 381
     end
381 382
   end

0 notes on commit 1cb1ea0

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