mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Potential fix
This commit is contained in:
@@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
module Liquid
|
module Liquid
|
||||||
class Comment < Block
|
class Comment < Block
|
||||||
|
# Potential fix
|
||||||
|
FullTokenPossiblyInvalid = /\A(.*)#{TagStart}#{WhitespaceControl}?\s*(\w+)\s*(.*)?#{WhitespaceControl}?#{TagEnd}\z/om
|
||||||
|
|
||||||
|
def parse(tokens)
|
||||||
|
while (token = tokens.shift)
|
||||||
|
if token =~ FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
raise_tag_never_closed(block_name)
|
||||||
|
end
|
||||||
|
|
||||||
def render_to_output_buffer(_context, output)
|
def render_to_output_buffer(_context, output)
|
||||||
output
|
output
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user