Sha256: 84f8c8f5d0126d0eae70bc89cdf575778b49cd96696196f42d17a0fe070d7913

Contents?: true

Size: 434 Bytes

Versions: 6

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: true

require_relative 'include_directive_tracker'
require_relative 'conditional_directive_tracker'

module Asciidoctor::Reducer
  class Preprocessor < ::Asciidoctor::Extensions::Preprocessor
    def process doc, reader
      doc.options[:preserve_conditionals] ?
        (reader.extend IncludeDirectiveTracker) :
        (reader.extend ConditionalDirectiveTracker, IncludeDirectiveTracker)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asciidoctor-reducer-1.0.6 lib/asciidoctor/reducer/preprocessor.rb
asciidoctor-reducer-1.0.5 lib/asciidoctor/reducer/preprocessor.rb
asciidoctor-reducer-1.0.4 lib/asciidoctor/reducer/preprocessor.rb
asciidoctor-reducer-1.0.3 lib/asciidoctor/reducer/preprocessor.rb
asciidoctor-reducer-1.0.2 lib/asciidoctor/reducer/preprocessor.rb
asciidoctor-reducer-1.0.1 lib/asciidoctor/reducer/preprocessor.rb