Loading README.md +1 −0 Changes for README.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -813,6 +813,7 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * fixed improper unmodified file caching when `-S` was used * fixed formatting of empty triple quoted strings (#313) ### 18.6b1 Loading black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2546,7 +2546,7 @@ def normalize_string_quotes(leaf: Leaf) -> None: leaf.value = f"{prefix}{orig_quote}{body}{orig_quote}" new_body = sub_twice(escaped_orig_quote, rf"\1\2{orig_quote}", new_body) new_body = sub_twice(unescaped_new_quote, rf"\1\\{new_quote}", new_body) if new_quote == '"""' and new_body[-1] == '"': if new_quote == '"""' and new_body[-1:] == '"': # edge case: new_body = new_body[:-1] + '\\"' orig_escape_count = body.count("\\") Loading tests/data/string_quotes.py +2 −0 Changes for tests/data/string_quotes.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line '''''' '\'' '"' "'" Loading Loading @@ -45,6 +46,7 @@ # output """""" "'" '"' "'" Loading Loading
README.md +1 −0 Changes for README.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -813,6 +813,7 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * fixed improper unmodified file caching when `-S` was used * fixed formatting of empty triple quoted strings (#313) ### 18.6b1 Loading
black.py +1 −1 Changes for black.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2546,7 +2546,7 @@ def normalize_string_quotes(leaf: Leaf) -> None: leaf.value = f"{prefix}{orig_quote}{body}{orig_quote}" new_body = sub_twice(escaped_orig_quote, rf"\1\2{orig_quote}", new_body) new_body = sub_twice(unescaped_new_quote, rf"\1\\{new_quote}", new_body) if new_quote == '"""' and new_body[-1] == '"': if new_quote == '"""' and new_body[-1:] == '"': # edge case: new_body = new_body[:-1] + '\\"' orig_escape_count = body.count("\\") Loading
tests/data/string_quotes.py +2 −0 Changes for tests/data/string_quotes.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line '''''' '\'' '"' "'" Loading Loading @@ -45,6 +46,7 @@ # output """""" "'" '"' "'" Loading