-
-
Notifications
You must be signed in to change notification settings - Fork 824
✨ Make epilog formatting consistent with other parts of the help string
#1405
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
base: master
Are you sure you want to change the base?
Conversation
travishathaway
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a chance to read the original discussion and think this is a perfectly fine solution to this problem.
|
This looks like an elegant solution to the problem in my view, and also brings over some behaviour from the help description processing (mainly the usage of Great PR 🚀 I'll rebase my internal fork of typer and include these fixes until @tiangolo merges this PR. The last PR for an issue I was running into took about 1.5 years to get merged into typer master, so I'm hoping this one doesn't take quite that long 😅 |
This comment was marked as resolved.
This comment was marked as resolved.
svlandeg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code could further be simplified after #1304 has been merged. This is again good to review.
As discussed in #1400, the formatting of the
epilogsection of the help text is currently not consistent with the other parts of the help text.This PR introduces a new private function
_fix_linebreaksthat has the same functionality as before as part of_get_help_text. It deals with linebreaks depending on the given markup mode. This function is then also used when printing the epilog, ensuring consistency. Only the formatting of the epilog is changed, nothing else.On
master, the new unit test fails both for "markdown" and "rich", as it joins together the first few lines into one big"Just wrapping up: This is the first conclusion Here is conclusion two"line.