rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Fix for 4824 - multi comments cause internal error

Open davidBar-On opened this issue 2 years ago • 1 comments

Closes #4824

The suggested fix is in two code changes done for Version Two - by adding trim_start() before passing a comments string to rewrite_comment().

A more robust fix may be to do the trim_start() (or even trim()) inside rewrite_comment() (for Version Two), but I didn't evaluate the overall use of rewrite_comment() to make sure this is o.k.

davidBar-On avatar Aug 14 '22 12:08 davidBar-On

For what it's worth, I had a similar idea of removing the leading whitespace in #5392.

ytmimi avatar Aug 25 '22 13:08 ytmimi