X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c5fd578279ce9c576f5a5c9b56e5580a14227997..a9f50cd0b58259a11a1c851bde7b4f11321e5b3b:/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