Sha256: 298c7a9425c47128d113559b1259b9883295ab7c3a42dfe6e5543d53f2f247fa

Contents?: true

Size: 911 Bytes

Versions: 3

Compression:

Stored size: 911 Bytes

Contents

require 'hamlit/engine'
require 'hamlit/block/compiler'

module Hamlit
  module Block
    class Engine < Temple::Engine
      define_options(
        :buffer_class,
        generator:    Temple::Generators::ArrayBuffer,
        format:       :html,
        attr_quote:   "'",
        escape_html:  false,
        escape_attrs: true,
        autoclose:    %w(area base basefont br col command embed frame
                         hr img input isindex keygen link menuitem meta
                         param source track wbr),
        filename:     "",
      )

      use Hamlit::Parser
      use Hamlit::Block::Compiler
      use Hamlit::HTML
      filter :StringSplitter
      filter :StaticAnalyzer
      use Hamlit::Escapable
      use Hamlit::ForceEscapable
      filter :ControlFlow
      filter :MultiFlattener
      filter :StaticMerger
      use :Generator, -> { options[:generator] }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hamlit-block-0.8.0 lib/hamlit/block/engine.rb
hamlit-block-0.7.1 lib/hamlit/block/engine.rb
hamlit-block-0.7.0 lib/hamlit/block/engine.rb