Skip to content

Commit

Permalink
Support multi-line string when using fmt: skip decoration
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Sep 5, 2022
1 parent 788178e commit 8b44797
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/darker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ def _blacken_single_file( # pylint: disable=too-many-arguments,too-many-locals
)
for i, line in enumerate(rev2_isorted.lines):
line_num = i + 1
if line_num not in modified_line_nums:
if (
line_num not in modified_line_nums
and not line.endswith("\\")
and not line.endswith('"')
and not line.endswith("'")
):
line = f"{line} {FMT_DARKER_SKIP}"
lines.append(line)
rev2_isorted_decorated = TextDocument.from_lines(
Expand Down

0 comments on commit 8b44797

Please sign in to comment.