Module | Asciidoctor::Extensions |
In: |
lib/asciidoctor/extensions.rb
|
Extensions provide a way to participate in the parsing and converting phases of the AsciiDoc processor or extend the AsciiDoc syntax.
The various extensions participate in AsciiDoc processing as follows:
Extensions may be registered globally using the {Extensions.register} method or added to a custom {Registry} instance and passed as an option to a single Asciidoctor processor.
DSL | = | ProcessorDsl |
DSL | = | ProcessorDsl |
DSL | = | ProcessorDsl |
DSL | = | ProcessorDsl |
DSL | = | DocinfoProcessorDsl |
DSL | = | BlockProcessorDsl |
DSL | = | MacroProcessorDsl |
DSL | = | InlineMacroProcessorDsl |
Public: Registers an extension Group that subsequently registers a collection of extensions.
Registers the extension Group specified under the given name. If a name is not given, one is calculated by appending the next value in a 0-based index to the string "extgrp". For instance, the first unnamed extension group to be registered is assigned the name "extgrp0" if a name is not specified.
The names are not yet used, but are intended for selectively activating extensions in the future.
If the extension group argument is a String or a Symbol, it gets resolved to a Class before being registered.
name - The name under which this extension group is registered (optional, default: nil) group - A block (Proc), a Class, a String or Symbol name of a Class or
an Object instance of a Class.
Examples
Asciidoctor::Extensions.register UmlExtensions Asciidoctor::Extensions.register :uml, UmlExtensions Asciidoctor::Extensions.register do block_processor :plantuml, PlantUmlBlock end Asciidoctor::Extensions.register :uml do block_processor :plantuml, PlantUmlBlock end
Returns the [Proc, Class or Object] instance, matching the type passed to this method.