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
+6
View File
@@ -58,6 +58,9 @@ module Liquid
return yield tag_name, markup
end
new_tag = tag.parse(tag_name, markup, tokenizer, parse_context)
next if new_tag.is_a?(Comment)
@blank &&= new_tag.blank?
@nodelist << new_tag
end
@@ -153,6 +156,9 @@ module Liquid
return yield tag_name, markup
end
new_tag = tag.parse(tag_name, markup, tokenizer, parse_context)
next if new_tag.is_a?(Comment)
@blank &&= new_tag.blank?
@nodelist << new_tag
when token.start_with?(VARSTART)