Skip to content

fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting #2829

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

Merged
merged 2 commits into from
Jul 16, 2018

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Jul 7, 2018

Close #1210

The proposed implementation of rewrite_string relies less on manual handling of ranges within the string, which I find (subjectively!) easier to reason about. If you prefer the previous logic, I will modify this PR accordingly.
In addition, this rewrite keeps the max_width argument although it is unused ATM, for reasons described in a comment of the issue. I will change this PR as per the comment's response.

@topecongiro
Copy link
Contributor

Thank you for the PR! My apologies for the late review.

I think that we can safely remove max_width argument. Would you mind removing it while you are at this? Otherwise the PR LGTM, though we need a rebase.

@scampi
Copy link
Contributor Author

scampi commented Jul 14, 2018

@topecongiro no problem and thanks for having a look! I have removed the max_width argument and rebased.

@topecongiro topecongiro merged commit 48c3e46 into rust-lang:master Jul 16, 2018
@topecongiro
Copy link
Contributor

Thank you!

@scampi scampi deleted the issue1210 branch July 16, 2018 07:32
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

Successfully merging this pull request may close these issues.

2 participants