From 8edad66edc9388e541567370aadcbf1f712a9e77 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 27 Aug 2016 00:58:04 +0900 Subject: [PATCH] Indent cdata filter with 4 spaces It's original behavior. https://github.com/haml/haml/blob/4.0.7/lib/haml/filters.rb#L259 Related to: https://github.com/k0kubun/hamlit/pull/84 --- lib/hamlit/filters/cdata.rb | 2 +- test/haml/filters_test.rb | 2 +- test/hamlit/filters/cdata_test.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/hamlit/filters/cdata.rb b/lib/hamlit/filters/cdata.rb index f6e7a14c..458116b9 100644 --- a/lib/hamlit/filters/cdata.rb +++ b/lib/hamlit/filters/cdata.rb @@ -10,7 +10,7 @@ module Hamlit def compile_cdata(node) temple = [:multi] temple << [:static, "".freeze] temple end diff --git a/test/haml/filters_test.rb b/test/haml/filters_test.rb index 4f746f61..87c12156 100644 --- a/test/haml/filters_test.rb +++ b/test/haml/filters_test.rb @@ -226,7 +226,7 @@ class CSSFilterTest < Haml::TestCase end class CDATAFilterTest < Haml::TestCase - test "should wrap output in CDATA tag" do; skip + test "should wrap output in CDATA tag" do html = "\n" haml = ":cdata\n foo" assert_equal(html, render(haml)) diff --git a/test/hamlit/filters/cdata_test.rb b/test/hamlit/filters/cdata_test.rb index e66b95d1..f9497a0a 100644 --- a/test/hamlit/filters/cdata_test.rb +++ b/test/hamlit/filters/cdata_test.rb @@ -5,7 +5,7 @@ describe Hamlit::Filters do it 'renders cdata' do assert_render(<<-HTML.unindent, <<-HAML.unindent) HTML :cdata @@ -16,7 +16,7 @@ describe Hamlit::Filters do it 'parses string interpolation' do assert_render(<<-HTML.unindent, <<-HAML.unindent) bar + foo <&> bar ]]> HTML :cdata