pub enum SubstitutionDefDirective {
ReplacementText,
UnicodeCharCode,
Date,
}Expand description
An enumeration of different macro directive types.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#directives-for-substitution-definitions
Variants§
ReplacementText
The “replace” directive is used to indicate replacement text for a substitution reference. It may be used within substitution definitions only. For example, this directive can be used to expand abbreviations:
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#replacement-text
UnicodeCharCode
The “unicode” directive converts Unicode character codes (numerical values) to characters, and may be used in substitution definitions only.
The arguments, separated by spaces, can be:
- character codes as
- decimal numbers or
- hexadecimal numbers, prefixed by 0x, x, \x, U+, u, or \u or as XML-style hexadecimal character entities, e.g. ᨫ
- text, which is used as-is.
Text following “ .. “ is a comment and is ignored. The spaces between the arguments are ignored and thus do not appear in the output. Hexadecimal codes are case-insensitive.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#unicode-character-codes
Date
The “date” directive generates the current local date and inserts it into the document as text. This directive may be used in substitution definitions only.
The optional directive content is interpreted as the desired date format, using the same codes as Python’s time.strftime function. The default format is “%Y-%m-%d” (ISO 8601 date), but time fields can also be used. Examples:
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#date