mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge pull request #257 from Shopify/fix_comment_tags_second_try
Fix unknown tags in comment tags, second try
This commit is contained in:
@@ -4,6 +4,9 @@ module Liquid
|
|||||||
''
|
''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def unknown_tag(tag, markup, tokens)
|
||||||
|
end
|
||||||
|
|
||||||
def blank?
|
def blank?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ class StandardTagTest < Test::Unit::TestCase
|
|||||||
assert_template_result('','{% comment %}comment{% endcomment %}')
|
assert_template_result('','{% comment %}comment{% endcomment %}')
|
||||||
assert_template_result('','{% comment %} 1 {% comment %} 2 {% endcomment %} 3 {% endcomment %}')
|
assert_template_result('','{% comment %} 1 {% comment %} 2 {% endcomment %} 3 {% endcomment %}')
|
||||||
|
|
||||||
|
assert_template_result('','{%comment%}{%blabla%}{%endcomment%}')
|
||||||
|
assert_template_result('','{% comment %}{% blabla %}{% endcomment %}')
|
||||||
|
assert_template_result('','{%comment%}{% endif %}{%endcomment%}')
|
||||||
|
assert_template_result('','{% comment %}{% endwhatever %}{% endcomment %}')
|
||||||
|
assert_template_result('','{% comment %}{% raw %} {{%%%%}} }} { {% endcomment %} {% comment {% endraw %} {% endcomment %}')
|
||||||
|
|
||||||
assert_template_result('foobar','foo{%comment%}comment{%endcomment%}bar')
|
assert_template_result('foobar','foo{%comment%}comment{%endcomment%}bar')
|
||||||
assert_template_result('foobar','foo{% comment %}comment{% endcomment %}bar')
|
assert_template_result('foobar','foo{% comment %}comment{% endcomment %}bar')
|
||||||
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