-
Notifications
You must be signed in to change notification settings - Fork 915
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
Regression with wrap_comments=true
#5862
Comments
|
It seems #5423 also changed how unordered list works |
But you used comment Rust style guide doesn't mention Markdown https://doc.rust-lang.org/nightly/style-guide/index.html#comments Rustdoc says it uses Markdown https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html?highlight=markdown#markdown |
@xxchan thanks for helping to look into this and for providing a workaround for the issue. @rwestphal Thanks for the report. Confirming I can reproduce this with input // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | |
// + +
// | Mandatory Parameters |
// + +
// | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ output (using // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | |
// + +
// | Mandatory Parameters |
// + +
// | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
On further reflection I don't think that's the case. |
@xxchan Do you have any interest in workin on the? Part of me thinks that the solution might be as simple as wrapping this in a check for Lines 806 to 813 in f89cd3c
|
Add a CI pipeline to validate code formatting on Pull Requests. Also, temporarily disable "wrap_comments = true" in rustfmt.toml until a rustfmt regression [1] is fixed. [1] rust-lang/rustfmt#5862 Signed-off-by: Renato Westphal <[email protected]>
Add a CI pipeline to validate code formatting on Pull Requests. Also, temporarily disable "wrap_comments = true" in rustfmt.toml until a rustfmt regression [1] is fixed. [1] rust-lang/rustfmt#5862 Signed-off-by: Renato Westphal <[email protected]>
Add a CI pipeline to validate code formatting on Pull Requests. Also, temporarily disable "wrap_comments = true" in rustfmt.toml until a rustfmt regression [1] is fixed. [1] rust-lang/rustfmt#5862 Signed-off-by: Renato Westphal <[email protected]>
Hi all,
I've noticed a regression that happened between
rustfmt 1.5.2-nightly (fe7454b 2023-06-19)
andrustfmt 1.5.3-nightly (4651421 2023-06-20)
.In my project [1], whenever I run
cargo fmt
, some comment lines are mangled unexpectedly. Here's the full diff: https://pastebin.com/raw/HwqgrCUzIf I disable
wrap_comments=true
in rustfmt.toml, the problem no longer occurs.Interestingly, I couldn't reproduce the problem using a small demonstration program. It only happens when using
rustfmt
orcargo fmt
in my project (which has around 75k LoC).This is similar to #5835, but not quite the same problem.
Please let me know if you need more info to look into this.
[1] https://github.com/rwestphal/holo
The text was updated successfully, but these errors were encountered: