filter args

This commit is contained in:
Isha
2014-03-03 03:38:19 +00:00
parent 331cf067b1
commit 57fdbe81b8
3 changed files with 118 additions and 101 deletions
+11 -12
View File
@@ -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)