diff --git a/test/unit/tags/comment_tag_unit_test.rb b/test/unit/tags/comment_tag_unit_test.rb index 457d224a..f201e277 100644 --- a/test/unit/tags/comment_tag_unit_test.rb +++ b/test/unit/tags/comment_tag_unit_test.rb @@ -20,6 +20,16 @@ class CommentTagUnitTest < Minitest::Test assert_equal("", template.render) end + def test_allows_incomplete_tags_inside_a_comment + template = Liquid::Template.parse(<<~LIQUID.chomp, line_numbers: true) + {% comment %} + {% assign foo = "1" + {% endcomment %} + LIQUID + + assert_equal("", template.render) + end + def test_child_comment_tags_need_to_be_closed template = Liquid::Template.parse(<<~LIQUID.chomp, line_numbers: true) {% comment %}