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
+6
View File
@@ -32,6 +32,12 @@ class BlockUnitTest < Minitest::Test
assert_equal(String, template.root.nodelist[2].class)
end
def test_variable_with_multibyte_character
template = Liquid::Template.parse("{{ '❤️' }}")
assert_equal(1, template.root.nodelist.size)
assert_equal(Variable, template.root.nodelist[0].class)
end
def test_variable_many_embedded_fragments
template = Liquid::Template.parse(" {{funk}} {{so}} {{brother}} ")
assert_equal(7, template.root.nodelist.size)