Skip to content

Commit 101d7c6

Browse files
committed
Adapt indent calculation
1 parent 67c9ae6 commit 101d7c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

code_tokenize/lang/python/indent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ def visit_block(self, block):
1717
def leave_block(self, block):
1818
self.handler.handle_token(DedentToken(self.config))
1919

20+
def leave_comment(self, comment):
21+
self.handler.handle_token(NewlineToken(self.config))
22+
2023
def leave(self, node):
2124
if not node.type.endswith('statement'): return
2225
self.handler.handle_token(NewlineToken(self.config))

0 commit comments

Comments
 (0)