mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Fix tags in comment
This commit is contained in:
@@ -114,7 +114,7 @@ module Liquid
|
||||
when token.start_with?(TAGSTART)
|
||||
whitespace_handler(token, parse_context)
|
||||
unless token =~ FullToken
|
||||
BlockBody.raise_missing_tag_terminator(token, parse_context)
|
||||
return yield token, token
|
||||
end
|
||||
tag_name = Regexp.last_match(2)
|
||||
markup = Regexp.last_match(4)
|
||||
|
||||
@@ -36,6 +36,8 @@ class StandardTagTest < Minitest::Test
|
||||
assert_template_result('', '{%comment%}{% endif %}{%endcomment%}')
|
||||
assert_template_result('', '{% comment %}{% endwhatever %}{% endcomment %}')
|
||||
assert_template_result('', '{% comment %}{% raw %} {{%%%%}} }} { {% endcomment %} {% comment {% endraw %} {% endcomment %}')
|
||||
assert_template_result('', '{% comment %}{% " %}{% endcomment %}')
|
||||
assert_template_result('', '{% comment %}{%%}{% endcomment %}')
|
||||
|
||||
assert_template_result('foobar', 'foo{%comment%}comment{%endcomment%}bar')
|
||||
assert_template_result('foobar', 'foo{% comment %}comment{% endcomment %}bar')
|
||||
|
||||
Reference in New Issue
Block a user