Sha256: 37c9c62a04cf5fb430861bff8d3b7dba5e9ce631f043f27a22da38ff5d07b2d4
Contents?: true
Size: 444 Bytes
Versions: 2
Compression:
Stored size: 444 Bytes
Contents
# frozen_string_literal: true require_relative 'base' module Faml module FilterCompilers class Javascript < Base def compile(ast) temple = [:multi, [:static, "\n"], [:newline]] compile_texts(temple, ast.lineno, ast.texts, tab_width: 2) temple << [:static, "\n"] [:haml, :tag, 'script', false, [:html, :attrs], [:html, :js, temple]] end end register(:javascript, Javascript) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
faml-0.8.1 | lib/faml/filter_compilers/javascript.rb |
faml-0.8.0 | lib/faml/filter_compilers/javascript.rb |