Skip to content

Commit 066a467

Browse files
authored
Merge pull request #7 from jwhonce/elif
Add elif to else hack
2 parents 3308348 + 0ec3d6e commit 066a467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beautysh/beautysh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def beautify_string(self, data, path=''):
115115
outc += 1
116116
case_stack[-1] -= 1
117117
# an ad-hoc solution for the "else" keyword
118-
else_case = (
119-
0, -1)[re.search('^(else)', test_record) is not None]
118+
else_case = (0, -1)[re.search('^(else|elif)',
119+
test_record) is not None]
120120
net = inc - outc
121121
tab += min(net, 0)
122122
extab = tab + else_case

0 commit comments

Comments
 (0)