diff --git a/doc-src/HAML_CHANGELOG.md b/doc-src/HAML_CHANGELOG.md index 1de65a16..faa23b0c 100644 --- a/doc-src/HAML_CHANGELOG.md +++ b/doc-src/HAML_CHANGELOG.md @@ -29,6 +29,11 @@ Haml and `html2haml` now produce more descriptive errors when given a template with invalid byte sequences for that template's encoding, including the line number and the offending character. +### `:css` Filter + +Haml now supports a {file:HAML_REFERENCE.md#css-filter `:css` filter} +that surrounds the filtered text with ` +END + end + end + # Surrounds the filtered text with CDATA tags. module Cdata include Base diff --git a/test/haml/engine_test.rb b/test/haml/engine_test.rb index df228827..3d788bbc 100644 --- a/test/haml/engine_test.rb +++ b/test/haml/engine_test.rb @@ -909,6 +909,21 @@ END END end + def test_css_filter + assert_equal(< + /**/ + +CSS +:css + #foo { + bar: baz; } +SASS + end + def test_local_assigns_dont_modify_class assert_equal("bar\n", render("= foo", :locals => {:foo => 'bar'})) assert_equal(nil, defined?(foo))