InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

Global replace [ \t]+$, add "GB"

Open thinkyhead opened this issue 2 years ago • 3 comments

  • Strip all trailing whitespace from text files.
  • Add missing "GB" designation on download size.

thinkyhead avatar Dec 03 '22 10:12 thinkyhead

I would be more comfortable with this PR if it weren't also changing a bunch of .py and .js files. We'll have to do some extended testing on this to make sure that there wasn't a whitespace change that inadvertently broke something.

lstein avatar Dec 03 '22 18:12 lstein

Trailing whitespace removal is 100% safe and will have zero effect on the code. You'll notice that the regex ends in a $ which guarantees that it only replaces trailing whitespace. I do this regex replace all the time in the project I maintain, in that case with a mix of Python, C++, Javascript, shell scripts, etc. all in the same project, and it's just fine. Scan through the changes in the files tab above and you will see that all the changes are perfectly safe.

thinkyhead avatar Dec 04 '22 00:12 thinkyhead

Did a quick rebase from main and rechecked to make sure no non-text files were affected, and no "patch" files were affected.

thinkyhead avatar Dec 04 '22 01:12 thinkyhead