mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
skip filter arg splat for no-arg filters, trim render loop comments
This commit is contained in:
@@ -309,10 +309,7 @@ module Liquid
|
||||
output << node
|
||||
else
|
||||
render_node(context, output, node)
|
||||
# If we get an Interrupt that means the block must stop processing. An
|
||||
# Interrupt is any command that stops block execution such as {% break %}
|
||||
# or {% continue %}. These tags may also occur through Block or Include tags.
|
||||
break if context.interrupt? # might have happened in a for-block
|
||||
break if context.interrupt?
|
||||
end
|
||||
idx += 1
|
||||
|
||||
|
||||
@@ -254,8 +254,12 @@ module Liquid
|
||||
obj = context.evaluate(@name)
|
||||
|
||||
@filters.each do |filter_name, filter_args, filter_kwargs|
|
||||
filter_args = evaluate_filter_expressions(context, filter_args, filter_kwargs)
|
||||
obj = context.invoke(filter_name, obj, *filter_args)
|
||||
if filter_args.empty? && !filter_kwargs
|
||||
obj = context.invoke(filter_name, obj)
|
||||
else
|
||||
filter_args = evaluate_filter_expressions(context, filter_args, filter_kwargs)
|
||||
obj = context.invoke(filter_name, obj, *filter_args)
|
||||
end
|
||||
end
|
||||
|
||||
context.apply_global_filter(obj)
|
||||
|
||||
Reference in New Issue
Block a user