From 4dbb75123966a5c7b53006ca622fe246329d4b61 Mon Sep 17 00:00:00 2001 From: Rahul Arya Date: Sat, 6 Apr 2019 01:47:54 -0700 Subject: [PATCH] whoops (#138) * whoops * welp --- editor/formatter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/formatter.py b/editor/formatter.py index 143faf62..46339d7a 100644 --- a/editor/formatter.py +++ b/editor/formatter.py @@ -35,9 +35,11 @@ def prettify(strings: List[str], javastyle: bool=False) -> str: @lru_cache(CACHE_SIZE) def prettify_single(string: str, javastyle: bool) -> List[str]: + global java_newline if javastyle: - global java_newline java_newline = "\n" + else: + java_newline = "" out = [] buff = lexer.TokenBuffer([string], True) while not buff.done: