mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 00:40:40 -07:00
Merge pull request #1304 from Shopify/pz-raw-bug
Fix duplication of text in raw tags
This commit is contained in:
@@ -14,9 +14,9 @@ module Liquid
|
||||
def parse(tokens)
|
||||
@body = +''
|
||||
while (token = tokens.shift)
|
||||
if token =~ FullTokenPossiblyInvalid
|
||||
if token =~ FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2)
|
||||
@body << Regexp.last_match(1) if Regexp.last_match(1) != ""
|
||||
return if block_delimiter == Regexp.last_match(2)
|
||||
return
|
||||
end
|
||||
@body << token unless token.empty?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user