Preserve trailing semicolons when using fmt: off (#8275)

This commit is contained in:
Micha Reiser 2023-10-30 09:22:34 +09:00 committed by GitHub
parent 2c84f911c4
commit 3ccca332bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 108 additions and 8 deletions

View file

@ -0,0 +1,27 @@
def f():
# fmt: off
a = 10
if True:
with_semicolon = 10 \
;
formatted = true;
def f():
# fmt: off
if True:
with_semicolon = 20 \
; # comment
# fmt: off
statement = 0 \
;
# fmt: on
a = 10
# fmt: off
last_statement_with_semi ;