NegativeOptionHighlighter
This class provides regex-based highlighting for command-line style negative options and switches. It identifies and styles short-form switches and long-form options that begin with a hyphen, ensuring they are correctly recognized as distinct tokens within a text stream.
Attributes
| Attribute | Type | Description |
|---|---|---|
| highlights | list[str] = ['(^ | \W)(?P< negative_switch >\-\w+)(?![a-zA-Z0-9])', '(^ |
Constructor
Signature
def NegativeOptionHighlighter()
Methods
highlights()
def highlights() - > list
Defines the list of regular expression patterns used to identify and style negative command-line switches and options.
Returns
| Type | Description |
|---|---|
list | A list of raw string regex patterns containing named capture groups for negative switches and options. |