rustfmt
rustfmt copied to clipboard
`wrap_comments = true` breaks markdown tables
cargo fmt -- --config wrap_comments=true
turns this:
/// doc
///
/// Table that is > 80 symbols:
///
/// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
/// |-------|--------------------------------------------------------------------|
/// | val | x |
struct Item;
Into this:
/// doc
///
/// Table that is > 80 symbols:
///
/// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/// |
/// |-------|--------------------------------------------------------------------|
/// | val | x
/// |
struct Item;
It's possible to work around this issue by adding #[rustfmt::skip]
to the struct (or other documented item), but I think it's a bug anyway.
What is necessary to perform the backport here? If it's just cherry-picking the commits onto another branch I'm willing to do that if you let me know which branch.
@Nemo157, thanks for your interest. It might be as simple as a cherry-pick, but I don't know. I believe this is the PR #4214