Use Block Directives in Markdown
mainBlock directives are syntax extensions that create attributed containers to hold other block elements (like paragraphs or lists) or other block directives.
A block directive consists of three parts:
- Name: An at-symbol
@followed by a non-empty name (e.g.,@Directive). - Argument Text: Optional text inside parentheses
()following the name. - Content: The body of the directive wrapped in curly brackets
{}.
Syntax Examples
With arguments and content:
@Directive(x: 1, y: 2, z: 3) {
- A
- B
}Without arguments:
@Directive {
- A
- B
}Without content (omitting curly brackets):
@TOC
# Title@Directive(x: 1, y: 2
z: 3)
{
- A
- B
- C
}