Skip to content

Commit

Permalink
Fixed edge case. (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahularya50 authored Apr 6, 2019
1 parent 4dbb751 commit dd56613
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ def prettify_expr(expr: Formatted, remaining: int) -> Tuple[str, bool]:
out_str = expr.open_paren + operator + " " + operand_string.lstrip()
if expr.contents[-1].comments:
out_str += "\n"
out_str += java_newline + expr.close_paren
if len(expr.contents) > 2:
out_str += java_newline
out_str += expr.close_paren
out = verify(make_comments(expr.comments, 0, True) + out_str, remaining)
return out
# but may have to go here anyway, if inlining takes up too much space
Expand Down

0 comments on commit dd56613

Please sign in to comment.