Skip to main content

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

AttributeTypeDescription
highlightslist[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

TypeDescription
listA list of regex strings where named groups correspond to specific style names for highlighting.