Work around the return-type change in Liquid 2.3.0 by optionally converting from array to string. #441

Closed
wants to merge 1 commit into
from
@@ -35,10 +35,14 @@ def initialize(tag_name, markup, tokens)
end
def render(context)
+ code = super
+ # Work around for Liquid returning an array prior to 2.3.0
+ code = code.join if code.respond_to?(:join)
+
if context.registers[:site].pygments
- render_pygments(context, super.join)
+ render_pygments(context, code)
else
- render_codehighlighter(context, super.join)
+ render_codehighlighter(context, code)
end
end