mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
clean up comment tag body parsing
Co-authored-by: Peter Zhu <[email protected]>
This commit is contained in:
@@ -47,16 +47,12 @@ module Liquid
|
||||
|
||||
tag_name = tag_name_match[2]
|
||||
|
||||
if tag_name == "raw"
|
||||
# raw tags are required to be closed
|
||||
case tag_name
|
||||
when "raw"
|
||||
parse_raw_tag_body(tokens)
|
||||
next
|
||||
end
|
||||
|
||||
if tag_name_match[2] == "comment"
|
||||
when "comment"
|
||||
comment_tag_depth += 1
|
||||
next
|
||||
elsif tag_name_match[2] == "endcomment"
|
||||
when "endcomment"
|
||||
comment_tag_depth -= 1
|
||||
|
||||
return false if comment_tag_depth.zero?
|
||||
|
||||
Reference in New Issue
Block a user