From: Richard Si <63936253+ichard26@users.noreply.github.com> Date: Wed, 9 Jun 2021 00:46:09 +0000 (-0400) Subject: Regression fix: leave R prefixes capitalization alone (#2285) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/00e7e12a3a412ea386806d5d4eeaed345e912940?hp=00e7e12a3a412ea386806d5d4eeaed345e912940 Regression fix: leave R prefixes capitalization alone (#2285) `black.strings.get_string_prefix` used to lowercase the extracted prefix before returning it. This is wrong because 1) it ignores the fact we should leave R prefixes alone because of MagicPython, and 2) there is dedicated prefix casing handling code that fixes issue 1. `.lower` is too naive. This was originally fixed in 20.8b0, but was reintroduced since 21.4b0. I also added proper prefix normalization for docstrings by using the `black.strings.normalize_string_prefix` helper. Some more test strings were added to make sure strings with capitalized prefixes aren't treated differently (actually happened with my original patch, Jelle had to point it out to me). ---