Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent coloring of args in the top usage panel #16

Closed
hamdanal opened this issue Sep 25, 2022 · 1 comment · Fixed by #17
Closed

Inconsistent coloring of args in the top usage panel #16

hamdanal opened this issue Sep 25, 2022 · 1 comment · Fixed by #17
Labels
bug Something isn't working

Comments

@hamdanal
Copy link
Owner

i can't seem to upload screenshots but i also have a weird miscoloring - in [--max-decode-length MAX] only in the top panel... the length is a brighter shade of pink.

Originally posted by @michelcrypt4d4mus in #4 (comment)

@hamdanal hamdanal added the bug Something isn't working label Sep 25, 2022
@hamdanal
Copy link
Owner Author

hamdanal commented Sep 25, 2022

This is a bug caused by the current use of Syntax with awk lexer . It miscolors other awk keywords as well such as print.

# $ cat t.py:

import argparse
from rich_argparse import RichHelpFormatter

parser = argparse.ArgumentParser(formatter_class=RichHelpFormatter)
parser.add_argument("--max-decode-length", metavar="MAX")
parser.add_argument("--text-to-print", metavar="STR")
parser.print_usage()

# $ python -m t
rich_argparse_issue16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant