Merge pull request #1835 from Shopify/fix-multibyte-variable-parsing

fix parsing Variable blockbody with multibyte character
This commit is contained in:
Michael Go
2024-10-28 19:31:21 -03:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ module Liquid
parse_end = token.length - 3
parse_end -= 1 if token[parse_end] == "-"
markup_end = parse_end - i + 1
markup = markup_end <= 0 ? "" : token.byteslice(i, markup_end)
markup = markup_end <= 0 ? "" : token.slice(i, markup_end)
return Variable.new(markup, parse_context)
end