Sha256: ae09f9844f204b0a437d8c3c516ce671a05ec4c481e19509d401bab97e1b08e0
Contents?: true
Size: 762 Bytes
Versions: 18
Compression:
Stored size: 762 Bytes
Contents
module Hamlit class Filters class Javascript < TextBase def compile(node) case @format when :xhtml compile_xhtml(node) else compile_html(node) end end private def compile_html(node) temple = [:multi] temple << [:static, "<script>\n".freeze] compile_text!(temple, node, ' '.freeze) temple << [:static, "\n</script>".freeze] temple end def compile_xhtml(node) temple = [:multi] temple << [:static, "<script type='text/javascript'>\n //<![CDATA[\n".freeze] compile_text!(temple, node, ' '.freeze) temple << [:static, "\n //]]>\n</script>".freeze] temple end end end end
Version data entries
18 entries across 18 versions & 1 rubygems