Implement line numbers without the Liquid::Token class.

This commit is contained in:
Dylan Thacker-Smith
2015-07-08 19:21:59 -04:00
parent afda01adbb
commit cebf75b8d7
19 changed files with 186 additions and 194 deletions
+4 -4
View File
@@ -11,14 +11,14 @@ module Liquid
#
class Variable
FilterParser = /(?:\s+|#{QuotedFragment}|#{ArgumentSeparator})+/o
attr_accessor :filters, :name, :warnings
attr_accessor :line_number
attr_accessor :filters, :name, :line_number
include ParserSwitching
def initialize(markup, options = {})
def initialize(markup, parse_context)
@markup = markup
@name = nil
@options = options || {}
@options = parse_context
@line_number = parse_context.line_number
parse_with_selected_parser(markup)
end