don't add comment node to the nodelist

This commit is contained in:
Michael Go
2025-01-07 14:08:45 -04:00
parent b4667adadf
commit 879ec3e288
4 changed files with 32 additions and 4 deletions
+2 -2
View File
@@ -7,13 +7,13 @@ class TemplateUnitTest < Minitest::Test
def test_sets_default_localization_in_document
t = Template.new
t.parse('{%comment%}{%endcomment%}')
t.parse('{%raw%}{%endraw%}')
assert_instance_of(I18n, t.root.nodelist[0].options[:locale])
end
def test_sets_default_localization_in_context_with_quick_initialization
t = Template.new
t.parse('{%comment%}{%endcomment%}', locale: I18n.new(fixture("en_locale.yml")))
t.parse('{%raw%}{%endraw%}', locale: I18n.new(fixture("en_locale.yml")))
locale = t.root.nodelist[0].options[:locale]
assert_instance_of(I18n, locale)