The highlight tip should only clip the newlines before and after the *entire* block, not in between.

Ref: https://github.com/jneen/rouge/issues/230
This commit is contained in:
Parker Moore 2015-02-01 22:37:10 -08:00
parent e71c23981d
commit d24ea66933
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ eos
def render(context) def render(context)
prefix = context["highlighter_prefix"] || "" prefix = context["highlighter_prefix"] || ""
suffix = context["highlighter_suffix"] || "" suffix = context["highlighter_suffix"] || ""
code = super.to_s.gsub(/^(\n|\r)+|(\n|\r)+$/, '') code = super.to_s.gsub(/\A(\n|\r)+|(\n|\r)+\z/, '')
is_safe = !!context.registers[:site].safe is_safe = !!context.registers[:site].safe