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

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

### Methods

render_with_options

### Included Modules

Base

### Public Instance methods

render_with_options(text, options)

@see Base#render_with_options

[Source]

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

[Validate]