Fixing regression from block delimiter enhancement

This commit is contained in:
Jason Hiltz-Laforge
2014-07-23 19:18:02 +00:00
parent c75522026b
commit 55597b8398
3 changed files with 13 additions and 7 deletions
+5 -6
View File
@@ -5,11 +5,6 @@ module Liquid
TAGSTART = "{%".freeze
VARSTART = "{{".freeze
def initialize(tag_name, markup, options)
super
@block_delimiter = "end#{tag_name}"
end
def blank?
@blank
end
@@ -30,7 +25,7 @@ module Liquid
# if we found the proper block delimiter just end parsing here and let the outer block
# proceed
if @block_delimiter == $1
if block_delimiter == $1
end_tag
return
end
@@ -100,6 +95,10 @@ module Liquid
@tag_name
end
def block_delimiter
@block_delimiter ||= "end#{block_name}"
end
def create_variable(token)
token.scan(ContentOfVariable) do |content|
return Variable.new(content.first, @options)
+1 -1
View File
@@ -8,7 +8,7 @@ module Liquid
while token = tokens.shift
if token =~ FullTokenPossiblyInvalid
@nodelist << $1 if $1 != "".freeze
if @block_delimiter == $2
if block_delimiter == $2
end_tag
return
end