Skip to content

Commit

Permalink
Merge pull request #7 from jwhonce/elif
Browse files Browse the repository at this point in the history
Add elif to else hack
  • Loading branch information
lovesegfault authored Jun 12, 2017
2 parents 3308348 + 0ec3d6e commit 066a467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beautysh/beautysh.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def beautify_string(self, data, path=''):
outc += 1
case_stack[-1] -= 1
# an ad-hoc solution for the "else" keyword
else_case = (
0, -1)[re.search('^(else)', test_record) is not None]
else_case = (0, -1)[re.search('^(else|elif)',
test_record) is not None]
net = inc - outc
tab += min(net, 0)
extab = tab + else_case
Expand Down

0 comments on commit 066a467

Please sign in to comment.