-
Notifications
You must be signed in to change notification settings - Fork 86
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
Process line breaks in description #128
Comments
Same as #121. :-/ |
I had a little look into the code. I think there are two issues:
Here is that code extracted with some example input. The second issue is easy to solve. The first is more difficult because it isn't obvious when you want newlines. E.g. in this case you clearly do:
But here you probably don't
I vaguely recall some other argument parse "solving" this by letting you put
I think that would correctly format something like this:
I'll try it out. |
Ok the logic turned out to be slightly more complicated than I thought, but this seems to work:
Output:
Note the paragraphs are joined together into one line but the other bits aren't. Now just to fix the printing code... |
Ok that turned out to be easy - just loop through the lines in the description:
Output is:
Note the first two paragraphs have been reflowed but everything else is left as is. Full demo here. I will prepare a PR if somebody from the project says they would accept it. |
Fixes google#121 Fixes google#128
Actually I went ahead and did it because I can use it without waiting for a PR to be accepted. Just add this to your
|
Fixes google#121 Fixes google#128
Fixes google#121 Fixes google#128
Unless I'm missing something it is incredibly painfull to format descriptions with multiple lines. eg
The text was updated successfully, but these errors were encountered: