Fix unknown tags in comment tags, second try

This commit is contained in:
Florian Weingarten
2013-09-11 12:31:54 -04:00
parent bd20595f1a
commit 5b172a4c05
2 changed files with 9 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ module Liquid
''
end
def unknown_tag(tag, markup, tokens)
end
def blank?
true
end

View File

@@ -35,6 +35,12 @@ class StandardTagTest < Test::Unit::TestCase
assert_template_result('','{% comment %}comment{% 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')