From 8e41dd777b16f45c6fe8ce044c776a76372a5e0c Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 22 May 2012 16:29:43 -0500 Subject: [PATCH] updated puts.rb to work with latest liquid and added different output based on character width --- plugins/puts.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/puts.rb b/plugins/puts.rb index a8013ac..49eb5ea 100644 --- a/plugins/puts.rb +++ b/plugins/puts.rb @@ -23,8 +23,14 @@ module Jekyll end def render(context) - puts ">>> {% puts %} <<<" - puts super.map(&:strip).join + # Use a block if label + output is wider than 80 characters + if super.length > 69 + puts "{% puts %}" + puts super + puts "{% endputs %}" + else + puts "{% puts %} #{super}" + end end end end