We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d2caff commit 477d02bCopy full SHA for 477d02b
1 file changed
tools/reduce.py
@@ -178,14 +178,16 @@ def removeblocks(filedata):
178
179
i2 = i1
180
indent = 0
181
- while i2 < len(filedata) and indent>=0:
+ while i2 < len(filedata):
182
for c in filedata[i2]:
183
if c == '}':
184
indent = indent - 1
185
if indent == 0:
186
indent = -100
187
elif c == '{':
188
indent = indent + 1
189
+ if indent < 0:
190
+ break
191
i2 = i2 + 1
192
if indent == -100:
193
0 commit comments