Skip to content

Commit 882ecbc

Browse files
committed
fix: refine newline detection to exclude empty lines
1 parent ca2b44b commit 882ecbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/docformatter/classify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def is_newline_continuation(
441441
if (
442442
token.type in (tokenize.NEWLINE, tokenize.NL)
443443
and token.line.strip() in prev_token.line.strip()
444-
and token.line != "\n"
444+
and token.line not in {"\n", "\r\n"}
445445
):
446446
return True
447447

0 commit comments

Comments
 (0)