mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Remove body attr_reader and initiliaze @body instance variable in parse method
This commit is contained in:
@@ -30,15 +30,14 @@ module Liquid
|
||||
class Doc < Block
|
||||
NO_UNEXPECTED_ARGS = /\A\s*\z/
|
||||
|
||||
attr_reader :body
|
||||
|
||||
def initialize(tag_name, markup, parse_context)
|
||||
super
|
||||
@body = +""
|
||||
ensure_valid_markup(tag_name, markup, parse_context)
|
||||
end
|
||||
|
||||
def parse(tokens)
|
||||
@body = +""
|
||||
|
||||
while (token = tokens.shift)
|
||||
tag_name = token =~ BlockBody::FullTokenPossiblyInvalid && Regexp.last_match(2)
|
||||
|
||||
@@ -64,7 +63,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def nodelist
|
||||
[]
|
||||
[@body]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user