From 2a3f0c0ec3e5d81291dd73e36c63c9ce6b93b411 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 2 Feb 2014 21:42:01 -0500 Subject: [PATCH] Strip content of the {% highlight %} block A fix for #1801 --- lib/jekyll/tags/highlight.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/tags/highlight.rb b/lib/jekyll/tags/highlight.rb index eb128d32..000629a2 100644 --- a/lib/jekyll/tags/highlight.rb +++ b/lib/jekyll/tags/highlight.rb @@ -41,13 +41,14 @@ eos end def render(context) + code = super.to_s.strip case context.registers[:site].highlighter when 'pygments' - render_pygments(context, super) + render_pygments(context, code) when 'rouge' - render_rouge(context, super) + render_rouge(context, code) else - render_codehighlighter(context, super) + render_codehighlighter(context, code) end end