Module Haml::Filters::Javascript
In: lib/haml/filters.rb

Surrounds the filtered text with `<script>` and CDATA tags. Useful for including inline Javascript.

Methods

Included Modules

Base

Public Instance methods

@see Base#render_with_options

[Source]

     # File lib/haml/filters.rb, line 193
193:       def render_with_options(text, options)
194:         "<script type=\#{options[:attr_wrapper]}text/javascript\#{options[:attr_wrapper]}>\n  //<![CDATA[\n    \#{text.rstrip.gsub(\"\\n\", \"\\n    \")}\n  //]]>\n</script>\n"
195:       end

[Validate]