Class InlineMacroProcessor

    • Field Detail

      • REGEXP

        public static final java.lang.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:
        Constant Field Values
    • Constructor Detail

      • InlineMacroProcessor

        public InlineMacroProcessor()
      • InlineMacroProcessor

        public InlineMacroProcessor​(java.lang.String macroName)
      • InlineMacroProcessor

        public InlineMacroProcessor​(java.lang.String macroName,
                                    java.util.Map<java.lang.String,​java.lang.Object> config)