mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
filter args
This commit is contained in:
+11
-12
@@ -11,7 +11,6 @@ module Liquid
|
||||
# {{ user | link }}
|
||||
#
|
||||
class Variable
|
||||
# FilterParser = /(?:#{FilterSeparator}|(?:\s*(?:#{QuotedFragment}|#{ArgumentSeparator})\s*)+)/o
|
||||
EasyParse = /\A *(\w+(?:\.\w+)*) *\z/
|
||||
attr_accessor :filters, :name, :warnings
|
||||
|
||||
@@ -21,18 +20,18 @@ module Liquid
|
||||
@options = options || {}
|
||||
|
||||
|
||||
# case @options[:error_mode] || Template.error_mode
|
||||
# when :strict then strict_parse(markup)
|
||||
# when :lax then lax_parse(markup)
|
||||
# when :warn
|
||||
# begin
|
||||
# strict_parse(markup)
|
||||
# rescue SyntaxError => e
|
||||
# @warnings ||= []
|
||||
# @warnings << e
|
||||
case @options[:error_mode] || Template.error_mode
|
||||
when :strict then strict_parse(markup)
|
||||
when :lax then lax_parse(markup)
|
||||
when :warn
|
||||
begin
|
||||
strict_parse(markup)
|
||||
rescue SyntaxError => e
|
||||
@warnings ||= []
|
||||
@warnings << e
|
||||
lax_parse(markup)
|
||||
# end
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# def lax_parse(markup)
|
||||
|
||||
Reference in New Issue
Block a user