X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/1f445a01c8c073058ccd6ca6ceba8f527e6cbf15..e5f8251704c22b143b79474905c6c4b7e10ddb47:/black.py?ds=inline diff --git a/black.py b/black.py index 9ea4694..da7af03 100644 --- a/black.py +++ b/black.py @@ -754,13 +754,13 @@ class EmptyLineTracker: def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]: max_allowed = 1 - if current_line.is_comment and current_line.depth == 0: + if current_line.depth == 0: max_allowed = 2 if current_line.leaves: # Consume the first leaf's extra newlines. first_leaf = current_line.leaves[0] before = first_leaf.prefix.count('\n') - before = min(before, max(before, max_allowed)) + before = min(before, max_allowed) first_leaf.prefix = '' else: before = 0