Package org.asciidoctor.extension
Class InlineMacroProcessor
java.lang.Object
org.asciidoctor.extension.BaseProcessor
org.asciidoctor.extension.MacroProcessor<ContentNode>
org.asciidoctor.extension.InlineMacroProcessor
- All Implemented Interfaces:
Processor
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This value is used as the config option key when defining a regular expression that should be used to match an inline macro invocation.Fields inherited from class org.asciidoctor.extension.MacroProcessor
name
-
Constructor Summary
ConstructorDescriptionInlineMacroProcessor
(String macroName) InlineMacroProcessor
(String macroName, Map<String, Object> config) -
Method Summary
Methods inherited from class org.asciidoctor.extension.MacroProcessor
getName, options, process, setName
Methods inherited from class org.asciidoctor.extension.BaseProcessor
createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createDocument, createList, createList, createList, createListItem, createListItem, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createSection, createSection, createSection, createSection, createSection, createTable, createTable, createTableCell, createTableCell, createTableCell, createTableCell, createTableColumn, createTableColumn, createTableRow, getConfig, log, parseContent, setConfig, unwrap, updateConfig
-
Field Details
-
REGEXP
This value is used as the config option key when defining a regular expression that should be used to match an inline macro invocation. Its value must be a String containing a regular expression :Example to make a InlineMacroProcessor work on inline macros of the form
man:[A-Za-z0-9]+\\[.*?\\]
:Map<String, Object> config = new HashMap<>(); config.put(REGEXP, "man:([A-Za-z0-9]+)\\[(.*?)\\]"); InlineMacroProcessor inlineMacroProcessor = new InlineMacroProcessor("man", config); asciidoctor.javaExtensionRegistry().inlineMacro(inlineMacroProcessor); Note the parens
(
and)
in the regular expression in the example to capture the target and attributes of the macro invocation.- See Also:
-
-
Constructor Details
-
InlineMacroProcessor
public InlineMacroProcessor() -
InlineMacroProcessor
-
InlineMacroProcessor
-