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

wrap_comments = true breaks markdown tables #4607

Closed
jhpratt opened this issue Dec 21, 2020 · 3 comments
Closed

wrap_comments = true breaks markdown tables #4607

jhpratt opened this issue Dec 21, 2020 · 3 comments
Labels
bug Panic, non-idempotency, invalid code, etc. duplicate

Comments

@jhpratt
Copy link
Member

jhpratt commented Dec 21, 2020

To be 100% clear: I am aware this is a duplicate. It appears this is a regression, as presumably it worked at some point (the original is closed).

See #4210. This exact situation occurs on latest rustfmt.

Describe the bug

Running rustfmt --config wrap_comments=true example.rs on

/// doc
///
/// Table that is > 80 symbols:
///
/// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
/// |-------|--------------------------------------------------------------------|
/// | val   | x                                                                  |
struct Item;

turns it into

/// doc
///
/// Table that is > 80 symbols:
///
/// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/// |
/// |-------|--------------------------------------------------------------------|
/// | val   | x
/// |
struct Item;

This breaks the markdown.

Meta

  • rustfmt version: rustfmt 1.4.29-nightly (70ce182 2020-12-04)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: Reproducible with just plain old rustfmt

Related:

@jhpratt jhpratt added the bug Panic, non-idempotency, invalid code, etc. label Dec 21, 2020
@jhpratt
Copy link
Member Author

jhpratt commented Dec 21, 2020

@rustbot modify labels to +unstable option, +only-with-option

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2020

Error: This repository is not enabled to use triagebot.
Add a triagebot.toml in the root of the master branch to enable it.

Please let @rust-lang/release know if you're having trouble with this bot.

@calebcartwright
Copy link
Member

It appears this is a regression, as presumably it worked at some point (the original is closed).

Closing because this is both a duplicate and incorrect. I've also added the backport pending label to #4210 for clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc. duplicate
Projects
None yet
Development

No branches or pull requests

3 participants