From a90364c35b5fe38cb6e4f51660466caa59f1e179 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 13 Oct 2015 23:10:17 +0900 Subject: [PATCH] Prevent unexpected indentation --- lib/hamlit/engine.rb | 1 + test/haml-spec/pretty_test.rb | 45 +---------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/lib/hamlit/engine.rb b/lib/hamlit/engine.rb index 75c32b58..55796428 100644 --- a/lib/hamlit/engine.rb +++ b/lib/hamlit/engine.rb @@ -15,6 +15,7 @@ module Hamlit hr img input isindex keygen link menuitem meta param source track wbr), filename: "", + indent_tags: [], ) use Parser diff --git a/test/haml-spec/pretty_test.rb b/test/haml-spec/pretty_test.rb index 69d4c781..c0d14149 100644 --- a/test/haml-spec/pretty_test.rb +++ b/test/haml-spec/pretty_test.rb @@ -150,8 +150,7 @@ class PrettyTest < MiniTest::Test class Basichamltagsandcss < MiniTest::Test def test_a_simple_Haml_tag - skip - haml = %q{%p} + haml = %q{%p a} html = %q{

} locals = {} options = {} @@ -211,7 +210,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_a_CSS_class - skip haml = %q{%p.class1} html = %q{

} locals = {} @@ -222,7 +220,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_multiple_CSS_classes - skip haml = %q{%p.class1.class2} html = %q{

} locals = {} @@ -233,7 +230,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_a_CSS_id - skip haml = %q{%p#id1} html = %q{

} locals = {} @@ -244,7 +240,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_multiple_CSS_id_s - skip haml = %q{%p#id1#id2} html = %q{

} locals = {} @@ -255,7 +250,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_a_class_followed_by_an_id - skip haml = %q{%p.class1#id1} html = %q{

} locals = {} @@ -266,7 +260,6 @@ class PrettyTest < MiniTest::Test end def test_a_tag_with_an_id_followed_by_a_class - skip haml = %q{%p#id1.class1} html = %q{

} locals = {} @@ -277,7 +270,6 @@ class PrettyTest < MiniTest::Test end def test_an_implicit_div_with_a_CSS_id - skip haml = %q{#id1} html = %q{
} locals = {} @@ -288,7 +280,6 @@ class PrettyTest < MiniTest::Test end def test_an_implicit_div_with_a_CSS_class - skip haml = %q{.class1} html = %q{
} locals = {} @@ -370,7 +361,6 @@ class PrettyTest < MiniTest::Test class Tagswithunusualcssidentifiers < MiniTest::Test def test_an_all_numeric_class - skip haml = %q{.123} html = %q{
} locals = {} @@ -381,7 +371,6 @@ class PrettyTest < MiniTest::Test end def test_a_class_with_underscores - skip haml = %q{.__} html = %q{
} locals = {} @@ -392,7 +381,6 @@ class PrettyTest < MiniTest::Test end def test_a_class_with_dashes - skip haml = %q{.--} html = %q{
} locals = {} @@ -405,7 +393,6 @@ class PrettyTest < MiniTest::Test class Tagswithinlinecontent < MiniTest::Test def test_Inline_content_simple_tag - skip haml = %q{%p hello} html = %q{

hello

} locals = {} @@ -416,7 +403,6 @@ class PrettyTest < MiniTest::Test end def test_Inline_content_tag_with_CSS - skip haml = %q{%p.class1 hello} html = %q{

hello

} locals = {} @@ -496,7 +482,6 @@ class PrettyTest < MiniTest::Test class Tagswithhtmlstyleattributes < MiniTest::Test def test_HTML_style_one_attribute - skip haml = %q{%p(a='b')} html = %q{

} locals = {} @@ -507,7 +492,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_multiple_attributes - skip haml = %q{%p(a='b' c='d')} html = %q{

} locals = {} @@ -518,7 +502,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_attributes_separated_with_newlines - skip haml = %q{%p(a='b' c='d')} html = %q{

} @@ -530,7 +513,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_interpolated_attribute - skip haml = %q{%p(a="#{var}")} html = %q{

} locals = {:var=>"value"} @@ -541,7 +523,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_class_as_an_attribute - skip haml = %q{%p(class='class1')} html = %q{

} locals = {} @@ -552,7 +533,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_tag_with_a_CSS_class_and_class_as_an_attribute - skip haml = %q{%p.class2(class='class1')} html = %q{

} locals = {} @@ -563,7 +543,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_tag_with_id_as_an_attribute - skip haml = %q{%p(id='1')} html = %q{

} locals = {} @@ -574,7 +553,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_tag_with_a_CSS_id_and_id_as_an_attribute - skip haml = %q{%p#id(id='1')} html = %q{

} locals = {} @@ -585,7 +563,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_tag_with_a_variable_attribute - skip haml = %q{%p(class=var)} html = %q{

} locals = {:var=>"hello"} @@ -596,7 +573,6 @@ class PrettyTest < MiniTest::Test end def test_HTML_style_tag_with_a_CSS_class_and_class_as_a_variable_attribute - skip haml = %q{.hello(class=var)} html = %q{
} locals = {:var=>"world"} @@ -630,7 +606,6 @@ class PrettyTest < MiniTest::Test class Tagswithrubystyleattributes < MiniTest::Test def test_Ruby_style_one_attribute - skip haml = %q{%p{:a => 'b'}} html = %q{

} locals = {} @@ -641,7 +616,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_attributes_hash_with_whitespace - skip haml = %q{%p{ :a => 'b' }} html = %q{

} locals = {} @@ -652,7 +626,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_interpolated_attribute - skip haml = %q{%p{:a =>"#{var}"}} html = %q{

} locals = {:var=>"value"} @@ -663,7 +636,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_multiple_attributes - skip haml = %q{%p{ :a => 'b', 'c' => 'd' }} html = %q{

} locals = {} @@ -674,7 +646,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_attributes_separated_with_newlines - skip haml = %q{%p{ :a => 'b', 'c' => 'd' }} html = %q{

} @@ -686,7 +657,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_class_as_an_attribute - skip haml = %q{%p{:class => 'class1'}} html = %q{

} locals = {} @@ -697,7 +667,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_a_CSS_class_and_class_as_an_attribute - skip haml = %q{%p.class2{:class => 'class1'}} html = %q{

} locals = {} @@ -708,7 +677,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_id_as_an_attribute - skip haml = %q{%p{:id => '1'}} html = %q{

} locals = {} @@ -719,7 +687,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_a_CSS_id_and_id_as_an_attribute - skip haml = %q{%p#id{:id => '1'}} html = %q{

} locals = {} @@ -730,7 +697,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_a_CSS_id_and_a_numeric_id_as_an_attribute - skip haml = %q{%p#id{:id => 1}} html = %q{

} locals = {} @@ -741,7 +707,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_a_variable_attribute - skip haml = %q{%p{:class => var}} html = %q{

} locals = {:var=>"hello"} @@ -752,7 +717,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_with_a_CSS_class_and_class_as_a_variable_attribute - skip haml = %q{.hello{:class => var}} html = %q{
} locals = {:var=>"world"} @@ -763,7 +727,6 @@ class PrettyTest < MiniTest::Test end def test_Ruby_style_tag_multiple_CSS_classes_sorted_correctly_ - skip haml = %q{.z{:class => var}} html = %q{
} locals = {:var=>"a"} @@ -878,7 +841,6 @@ class PrettyTest < MiniTest::Test end def test_content_in_a_preserve_filter - skip haml = %q{:preserve hello @@ -893,7 +855,6 @@ class PrettyTest < MiniTest::Test end def test_content_in_a_plain_filter - skip haml = %q{:plain hello @@ -980,7 +941,6 @@ class PrettyTest < MiniTest::Test class Rubystyleinterpolation < MiniTest::Test def test_interpolation_inside_inline_content - skip haml = %q{%p #{var}} html = %q{

value

} locals = {:var=>"value"} @@ -991,7 +951,6 @@ class PrettyTest < MiniTest::Test end def test_no_interpolation_when_escaped - skip haml = %q{%p \#{var}} html = %q{

#{var}

} locals = {:var=>"value"} @@ -1002,7 +961,6 @@ class PrettyTest < MiniTest::Test end def test_interpolation_when_the_escape_character_is_escaped - skip haml = %q{%p \\#{var}} html = %q{

\value

} locals = {:var=>"value"} @@ -1120,7 +1078,6 @@ hello} class Whitespaceremoval < MiniTest::Test def test_a_tag_with_appended_and_inline_content - skip haml = %q{%li hello %li> world %li again}