Merge pull request #257 from Shopify/fix_comment_tags_second_try

Fix unknown tags in comment tags, second try
This commit is contained in:
Florian Weingarten
2013-09-11 13:33:26 -07:00
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@ module Liquid
'' ''
end end
def unknown_tag(tag, markup, tokens)
end
def blank? def blank?
true true
end end
+6
View File
@@ -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')