Merge pull request #1304 from Shopify/pz-raw-bug

Fix duplication of text in raw tags
This commit is contained in:
Peter Zhu
2020-10-05 10:59:15 -04:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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