flexmark-java extension for processing macros 0.64.8 API

flexmark-java extension for macros processing

Converts macros text to macro definitions and macro references.

Macro Definitions are block elements which can contain any markdown element

Macro definitions start with a line of >>>macroName where macro name consists of a-z, A-Z, 0-9, - or _ and is terminated by a line with <<<. All text between these lines is parsed as markdown blocks. Macro definition blocks can only be defined at the document level without any indentation and are not rendered in the output.

Macro reference is an inline element of the form <<<macroName>>> and is replaced by the macro definition rendered content, including any block elements. This implies that it is possible to include block elements where they are normally not possible using plain markdown.

When a macro definition contains a single paragraph node then it will be rendered as text contained by the paragraph without the <p></p> wrapper to allow plain text to be rendered as an inline text.

If a macro reference contains an undefined macroName then the node will be rendered as plain text consisting of <<<macroName>>>

Recursive macro references are resolved by stopping macro expansion on the first macro reference which refers to a macro definition which is currently being expanded. The first recursive macro reference will result in no expansion.

Packages 
Package Description
com.vladsch.flexmark.ext.macros