lib/liquid/template.rb in locomotive_liquid-2.2.3 vs lib/liquid/template.rb in locomotive_liquid-2.4.1

- old
+ new

@@ -53,11 +53,11 @@ end # Parse source code. # Returns self for easy chaining def parse(source, context = {}) - @root = Document.new(tokenize(Liquid::Literal.from_shorthand(source)), context.merge!(:template => self)) + @root = Document.new(tokenize(source), context.merge!(:template => self)) self end def registers @registers ||= {} @@ -119,10 +119,11 @@ end begin # render the nodelist. # for performance reasons we get a array back here. join will make a string out of it - @root.render(context).join + result = @root.render(context) + result.respond_to?(:join) ? result.join : result ensure @errors = context.errors end end