ec46ffd981
Fixes 5088 Previously, rustfmt would add a new comment line anytime it reformatted an itemized block within a comment when ``wrap_comments=true``. This would lead to rustfmt adding empty comments with trailing whitespace. Now, new comment lines are only added if the original comment spanned multiple lines, if the comment needs to be wrapped, or if the comment originally started with an empty comment line.
22 lines
1.1 KiB
XML
22 lines
1.1 KiB
XML
// rustfmt-wrap_comments: true
|
|
|
|
// - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
// tempor incididunt ut labore et dolore magna aliqua.
|
|
// - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
// tempor incididunt ut labore et dolore magna aliqua.
|
|
|
|
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
// tempor incididunt ut labore et dolore magna aliqua.
|
|
// * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
// tempor incididunt ut labore et dolore magna aliqua.
|
|
|
|
/* - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
* tempor incididunt ut labore et dolore magna aliqua. */
|
|
/* - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
* tempor incididunt ut labore et dolore magna aliqua. */
|
|
|
|
/* * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
* tempor incididunt ut labore et dolore magna aliqua. */
|
|
/* * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
* tempor incididunt ut labore et dolore magna aliqua. */
|