Package org.asciidoctor.extension
Annotation Type PositionalAttributes
-
@Documented @Retention(RUNTIME) @Target(TYPE) public @interface PositionalAttributes
Defines the on which attributes the first, second, etc attribute of a macro is mapped.Example: For this inline macro that defines
section
as the first positional parameter:@PositionalAttribute("section") @('man') public class ManPageMacroProcessor extends InlineMacroProcessor { public ManPageMacroProcessor(String macroName) { super(macroName) } public Object process(StructuralNode parent, String target, Map<String, Object> attributes) { assertEquals(attributes.get("section"), "7") } }
"7"
as value for the attributesection
:man:gittutorial[7]
Applicable for:
BlockMacroProcessor ✓ BlockProcessor ✓ BlockProcessor ✓ DocInfoProcessor IncludeProcessor ✓ InlineMacroProcessor ✓ Postprocessor Preprocessor Treeprocessor
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String[]
value
-