File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -214,11 +214,14 @@ def getTokenizer(python_code):
214
214
indents = 0
215
215
last_token = a [0 ]
216
216
for i__ in a [1 :- 1 ]:
217
+ if i__ .exact_type == 56 :
218
+ tokens .append ("\n " )
219
+ continue
217
220
if i__ .exact_type == 6 : # Dedent
218
221
indents -= 1
219
222
if i__ .exact_type == 5 : # Indent
220
223
indents += 1
221
- if last_token .exact_type == 4 or last_token . exact_type == 56 : # Newline
224
+ if last_token .exact_type == 4 : # Newline
222
225
tokens .append (indents * '\t ' )
223
226
224
227
if i__ .exact_type == 3 :
Original file line number Diff line number Diff line change @@ -25,11 +25,14 @@ def perfect_number_checker(num):
25
25
indents = 0
26
26
last_token = a [0 ]
27
27
for i__ in a [1 :- 1 ]:
28
+ if i__ .exact_type == 56 :
29
+ tokens .append ("\n " )
30
+ continue
28
31
if i__ .exact_type == 6 : # Dedent
29
32
indents -= 1
30
33
if i__ .exact_type == 5 : # Indent
31
34
indents += 1
32
- if last_token .exact_type == 4 or last_token . exact_type == 56 : # Newline
35
+ if last_token .exact_type == 4 : # Newline
33
36
tokens .append (indents * '\t ' )
34
37
35
38
if i__ .exact_type == 3 :
You can’t perform that action at this time.
0 commit comments