Sha256: 498e177a9ceb37cf3ef23a4a63722bf446574e2baaead54fbff5bfa17d409952

Contents?: true

Size: 1008 Bytes

Versions: 8

Compression:

Stored size: 1008 Bytes

Contents

# frozen_string_literal: true
require 'temple'
require 'hamlit/parser'
require 'hamlit/compiler'
require 'hamlit/html'
require 'hamlit/escapable'
require 'hamlit/force_escapable'
require 'hamlit/dynamic_merger'
require 'hamlit/ambles'

module Hamlit
  class Engine < Temple::Engine
    define_options(
      :buffer_class,
      generator:    Temple::Generators::ArrayBuffer,
      format:       :html,
      attr_quote:   "'",
      escape_html:  true,
      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 Parser
    use Compiler
    use HTML
    filter :StringSplitter
    filter :StaticAnalyzer
    use Escapable
    use ForceEscapable
    filter :ControlFlow
    use Ambles
    filter :MultiFlattener
    filter :StaticMerger
    use DynamicMerger
    use :Generator, -> { options[:generator] }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hamlit-2.15.2-java lib/hamlit/engine.rb
hamlit-2.15.2 lib/hamlit/engine.rb
hamlit-2.15.1-java lib/hamlit/engine.rb
hamlit-2.15.1 lib/hamlit/engine.rb
hamlit-2.15.0-java lib/hamlit/engine.rb
hamlit-2.15.0 lib/hamlit/engine.rb
hamlit-2.14.6 lib/hamlit/engine.rb
hamlit-2.14.6-java lib/hamlit/engine.rb