mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Add spaceless tag
This commit is contained in:
@@ -417,4 +417,9 @@ class StandardFiltersTest < Minitest::Test
|
||||
def test_cannot_access_private_methods
|
||||
assert_template_result('a', "{{ 'a' | to_number }}")
|
||||
end
|
||||
|
||||
def test_strip_html_whitespace
|
||||
html = "<a>\n\n <b> \n <c>a</c> \r\n </b> </a>"
|
||||
assert_template_result('<a><b><c>a</c></b></a>', "{{ a | strip_html_whitespace }}", { 'a' => html })
|
||||
end
|
||||
end # StandardFiltersTest
|
||||
|
||||
@@ -293,4 +293,9 @@ class StandardTagTest < Minitest::Test
|
||||
def test_multiline_tag
|
||||
assert_template_result '0 1 2 3', "0{%\nfor i in (1..3)\n%} {{\ni\n}}{%\nendfor\n%}"
|
||||
end
|
||||
|
||||
def test_spaceless
|
||||
html = "<a>\n\n <b> \n <c>a</c> \r\n </b> </a>"
|
||||
assert_template_result '<a><b><c>a</c></b></a>', "{% spaceless %}#{html}{% endspaceless %}"
|
||||
end
|
||||
end # StandardTagTest
|
||||
|
||||
Reference in New Issue
Block a user