Closed carbon108 closed 12 months ago
Thank you for opening this issue.
This is a bug. I am able to replicate it on my end.
The issue is in the function get_rich_epilog()
, which is in rich_click/rich_click.py
in 1.7 (is being moved in 1.8). It needs the text to be wrapped in _make_rich_rext()
.
If you want to fix, I can assign this to you (work off the branch 1.7.x
if you do).
If you'd rather me fix it, absolutely no issues with that; I can release a quick fix to 1.7.x
by end of day Sunday EST.
Hello @dwreeves Thank you for the quick and detailed reply So, please fix it if it's not an issue for you
@carbon108 -- rich-click==1.7.2
has been released and fixes the issue. There is also a STYLE_EPILOG_TEXT
config you can use if you'd like.
Example below:
import rich_click as click
@click.command("xyz", epilog="Example: [bold]xyz[/] --help")
@click.rich_config(help_config=click.RichHelpConfiguration(use_rich_markup=True))
def xyz():
"""Help XYZ"""
pass
xyz()
Note this requires USE_RICH_MARKUP
to be True
in order to work.
Thank you @dwreeves! Now it's working just fine
Hi!
We get an issue with rich markup in command
epilog
For the command:
we find
[bold]xyz[/]
in responceHow can one fix it? Advice is much appreciated