From 9d49b084267a81efb4d8c67ce84dca3b9e4bf233 Mon Sep 17 00:00:00 2001 From: claudiob Date: Sat, 8 Nov 2014 13:01:05 -0800 Subject: [PATCH] Import patch to bugfix from Padrino Helpers Padrino had an issue https://github.com/padrino/padrino-framework/issues/1582 which was solved at https://github.com/padrino/padrino-framework/commit/72769fe39a2f6368a474e05102cb7c35c5fdc685#diff-526024418d0d573e08d46ba3d55c02bcR36 This commit brings the same fix back into Middleman's method that overrides Padrino's method. --- .../lib/middleman-more/core_extensions/default_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-more/core_extensions/default_helpers.rb b/middleman-core/lib/middleman-more/core_extensions/default_helpers.rb index 39c1dc1b..c5af996b 100644 --- a/middleman-core/lib/middleman-more/core_extensions/default_helpers.rb +++ b/middleman-core/lib/middleman-more/core_extensions/default_helpers.rb @@ -12,7 +12,7 @@ class Padrino::Helpers::OutputHelpers::ErbHandler raw = block.call(*args) captured = template.instance_variable_get(:@_out_buf) self.output_buffer = _buf_was - engine_matches?(block) ? captured : raw + engine_matches?(block) && !captured.empty? ? captured : raw end end