MetavarHighlighter
This class provides specialized syntax highlighting for metavariables within command-line interface documentation. It utilizes regular expressions to identify and style delimiters such as brackets, angle brackets, and separators used in argument definitions.
Attributes
| Attribute | Type | Description |
|---|---|---|
| highlights | list[str] = ['^(?P< metavar_sep >(\[ | < ))', '(?P< metavar_sep >\ |
Constructor
Signature
def MetavarHighlighter() - > null
Methods
highlights()
def highlights() - > list
Defines a list of regular expression patterns used to identify and style metavariable separators such as brackets, angle brackets, pipes, and ellipsis in command-line help text.
Returns
| Type | Description |
|---|---|
list | A list of regex strings where named groups correspond to specific style names for highlighting. |