lib/asciidoctor/extensions.rb in asciidoctor-2.0.16 vs lib/asciidoctor/extensions.rb in asciidoctor-2.0.17

- old
+ new

@@ -509,10 +509,14 @@ # When Asciidoctor encounters a delimited block or paragraph with an # unrecognized name while parsing the document, it looks for a BlockProcessor # registered to handle this name and, if found, invokes its {Processor#process} # method to build a corresponding node in the document tree. # + # If the process method returns an instance of Block, the content model of that + # Block is :compound, and the Block contains at least one line, the parser will + # parse those lines into blocks an assigned them to the returned block. + # # AsciiDoc example: # # [shout] # Get a move on. # @@ -592,10 +596,14 @@ end # Public: BlockMacroProcessors are used to handle block macros that have a # custom name. # + # If the process method returns an instance of Block, the content model of that + # Block is :compound, and the Block contains at least one line, the parser will + # parse those lines into blocks an assigned them to the returned block. + # # BlockMacroProcessor implementations must extend BlockMacroProcessor. class BlockMacroProcessor < MacroProcessor def name raise ::ArgumentError, %(invalid name for block macro: #{@name}) unless MacroNameRx.match? @name.to_s @name @@ -664,11 +672,11 @@ end end # Public: A specialization of the Extension proxy that additionally stores a # reference to the {Processor#process} method. By storing this reference, its - # possible to accomodate both concrete extension implementations and Procs. + # possible to accommodate both concrete extension implementations and Procs. class ProcessorExtension < Extension attr_reader :process_method def initialize kind, instance, process_method = nil super kind, instance, instance.config @@ -952,10 +960,10 @@ def include_processors @include_processor_extensions end # Public: Registers an {DocinfoProcessor} with the extension registry to - # add additionnal docinfo to the document. + # add additional docinfo to the document. # # The DocinfoProcessor may be one of four types: # # * A DocinfoProcessor subclass # * An instance of a DocinfoProcessor subclass