Public: Preprocessors are run after the source text is split into lines and normalized, but before parsing begins.
Prior to invoking the preprocessor, Asciidoctor splits the source text into lines and normalizes them. The normalize process strips trailing whitespace from each line and leaves behind a line-feed character (i.e., ānā).
Asciidoctor passes a reference to the Reader and a copy of the lines Array to the {Processor#process} method of an instance of each registered Preprocessor. The Preprocessor modifies the Array as necessary and either returns a reference to the same Reader or a reference to a new Reader.
Preprocessor implementations must extend the Preprocessor class.
# File lib/asciidoctor/extensions.rb, line 180 def process document, reader raise ::NotImplementedError end