mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Fix warnings and make tags a proper syntax tree.
This commit is contained in:
@@ -13,12 +13,12 @@ module Liquid
|
||||
class Variable
|
||||
FilterParser = /(?:#{FilterSeparator}|(?:\s*(?:#{QuotedFragment}|#{ArgumentSeparator})\s*)+)/o
|
||||
EasyParse = /^ *(\w+(?:\.\w+)*) *$/
|
||||
attr_accessor :filters, :name
|
||||
attr_accessor :filters, :name, :warnings
|
||||
|
||||
def initialize(markup, options = {})
|
||||
@markup = markup
|
||||
@name = nil
|
||||
@warning = nil
|
||||
@warnings = []
|
||||
@options = options || {}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ module Liquid
|
||||
begin
|
||||
strict_parse(markup)
|
||||
rescue SyntaxError => e
|
||||
@warning = e
|
||||
@warnings << e
|
||||
lax_parse(markup)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user