Sha256: 7961159527d6aeeffd84efb08af12b4ff0be6dc20d3354b0e25411b2c8dea06b
Contents?: true
Size: 421 Bytes
Versions: 24
Compression:
Stored size: 421 Bytes
Contents
module Haml::Filters::Opal include Haml::Filters::Base def render_with_options ruby, options text = ::Opal.compile(ruby) if options[:format] == :html5 type = '' else type = " type=#{options[:attr_wrapper]}text/javascript#{options[:attr_wrapper]}" end text.rstrip! text.gsub!("\n", "\n ") <<HTML <script#{type}> //<![CDATA[ #{text} //]]> </script> HTML end end
Version data entries
24 entries across 24 versions & 1 rubygems