Module: Haml::Filters::Cdata

Includes:
Base
Defined in:
/var/build/temp/tmp.g5C1f6zb2g/4.0-0-0/ruby-haml/ruby-haml-3.1.6/lib/haml/filters.rb

Overview

Surrounds the filtered text with CDATA tags.

Instance Method Summary (collapse)

Methods included from Base

#compile, included, #internal_compile, #lazy_require, #render_with_options

Instance Method Details

- render(text)

See Also:



245
246
247
# File '/var/build/temp/tmp.g5C1f6zb2g/4.0-0-0/ruby-haml/ruby-haml-3.1.6/lib/haml/filters.rb', line 245

def render(text)
  "<![CDATA[#{("\n" + text).rstrip.gsub("\n", "\n    ")}\n]]>"
end