Class InlineMacroProcessor

All Implemented Interfaces:
Processor

public abstract class InlineMacroProcessor extends MacroProcessor<ContentNode>
  • Field Details

    • REGEXP

      public static final String 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

      public InlineMacroProcessor(String macroName)
    • InlineMacroProcessor

      public InlineMacroProcessor(String macroName, Map<String,Object> config)