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

Trim whitespace in readme output #139

Closed
SUPERCILEX opened this issue Sep 30, 2022 · 4 comments
Closed

Trim whitespace in readme output #139

SUPERCILEX opened this issue Sep 30, 2022 · 4 comments

Comments

@SUPERCILEX
Copy link
Contributor

I'm not sure if it's ok to trim whitespace in all output (since it'd be nice to have a tailing newline in some stdout file), so I'm thinking only trailing lines in readmes should be trimmed.

@epage
Copy link
Contributor

epage commented Oct 1, 2022

The way I'm using this in clap, I very much want that trailing newline in the readme files. We had very inconsistent trailing newlines until we adopted trycmd.

@SUPERCILEX
Copy link
Contributor Author

In readme files? Would you mind sharing an example of where having a blank line before the closing ``` is helpful?

@epage
Copy link
Contributor

epage commented Oct 3, 2022

First, in github rendering, it hasn't caused harm in my READMEs, like cargo-edit

Second, I was referring to how it helped us catch clap bugs by having it in all of our examples, like this output.

@SUPERCILEX
Copy link
Contributor Author

Ohhh, I see. You're saying that it should be consistent so you can catch whitespace bugs regardless of the position of the test. Makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants