Class: Asciidoctor::Extensions::Postprocessor
- Defined in:
- lib/asciidoctor/extensions.rb
Overview
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 Asciidoctor::Extensions::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.
Constant Summary collapse
- DSL =
DocumentProcessorDsl
Instance Attribute Summary
Attributes inherited from Processor
Instance Method Summary collapse
Methods inherited from Processor
config, #create_block, #create_image_block, #create_inline, #create_list, #create_list_item, #create_section, enable_dsl, #initialize, option, #parse_attributes, #parse_content, #update_config
Constructor Details
This class inherits a constructor from Asciidoctor::Extensions::Processor
Instance Method Details
#process(document, output) ⇒ Object
430 431 432 |
# File 'lib/asciidoctor/extensions.rb', line 430 def process document, output raise ::NotImplementedError, %(#{Postprocessor} subclass #{self.class} must implement the ##{__method__} method) end |