Closed
Description
Dear authors, I recently started using rich-click and have to say it looks amazing.
While playing around with click's command help sections, though, I noticed some inconsistent colouring/highlighting:
It seems that the argument related regex in the OptionHighlighter class (rich_help_configuration.py) is not handling things consistenly. Removing the regex seems to be more pleasing on the eyes...
class OptionHighlighter(rich.highlighter.RegexHighlighter):
"""Highlights our special options."""
highlights = [
r"(^|\W)(?P<switch>\-\w+)(?![a-zA-Z0-9])",
r"(^|\W)(?P<option>\-\-[\w\-]+)(?![a-zA-Z0-9])",
# r"(^|\W)(?P<argument>[A-Z0-9\_]+)(?![_a-zA-Z0-9])",
r"(?P<metavar>\<[^\>]+\>)",
r"(?P<usage>Usage: )",
]
Do we really need to auto highlight words in capitals or numbers inside the help section?