Skip to content

Commit

Permalink
[fix] really testing that I'm at the beginning here
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycojoker committed Mar 26, 2016
1 parent 2228eb0 commit 65f54f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions redbaron/base_nodes.py
Expand Up @@ -1602,13 +1602,17 @@ def _build_inner_list(self, node_list):
for i in node_list:
if i.type != "endl":
result.append([i, []])
still_at_beginning = False
elif previous and previous.type == "endl":
result.append([i, []])
still_at_beginning = False
elif still_at_beginning and self.first_blank_lines:
result.append([i, []])
still_at_beginning = False
else:
if result:
result[-1][1].append(i)
still_at_beginning = False
else:
self.first_blank_lines.append(i)
still_at_beginning = True
Expand All @@ -1618,8 +1622,6 @@ def _build_inner_list(self, node_list):
else:
previous = i

still_at_beginning = False

return result

def _get_separator_indentation(self):
Expand Down

0 comments on commit 65f54f8

Please sign in to comment.