class Asciidoctor::Extensions::Postprocessor

Public: Postprocessors are run after the document is converted, but before it is written to the output stream.

Asciidoctor passes a reference to the converted String to the {Processor#process} method of each registered Postprocessor. The Preprocessor modifies the String as necessary and returns the String replacement.

The markup format in the String is determined by the backend used to convert the Document. The backend and be looked up using the backend method on the Document object, as well as various backend-related document attributes.

TIP: Postprocessors can also be used to relocate assets needed by the published document.

Postprocessor implementations must Postprocessor.

Constants

DSL

Internal: Overlays a builder DSL for configuring the Processor instance. Includes a method to define configuration options and another to define the {Processor#process} method.

Public Instance Methods

process(document, output) click to toggle source
# File lib/asciidoctor/extensions.rb, line 358
def process document, output
  raise ::NotImplementedError, %(Asciidoctor::Extensions::Postprocessor subclass must implement ##{__method__} method)
end