module Haml::Filters::Css
def render_with_options(text, options)
- See: Base#render_with_options -
def render_with_options(text, options) indent = options[:cdata] ? ' ' : ' ' # 4 or 2 spaces if options[:format] == :html5 type = '' else type = " type=#{options[:attr_wrapper]}text/css#{options[:attr_wrapper]}" end str = "<style#{type}>\n" str << " /*<![CDATA[*/\n" if options[:cdata] str << "#{indent}#{text.rstrip.gsub("\n", "\n#{indent}")}\n" str << " /*]]>*/\n" if options[:cdata] str << "</style>" str end