summaryrefslogtreecommitdiff
path: root/src/GF/JavaScript
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/JavaScript')
-rw-r--r--src/GF/JavaScript/PrintJS.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GF/JavaScript/PrintJS.hs b/src/GF/JavaScript/PrintJS.hs
index f901a62df..9f85a58e9 100644
--- a/src/GF/JavaScript/PrintJS.hs
+++ b/src/GF/JavaScript/PrintJS.hs
@@ -26,10 +26,10 @@ render d = rend 0 (map ($ "") $ d []) "" where
space t = showString t . (\s -> if null s then "" else (' ':s))
spaceAfter :: String -> Bool
-spaceAfter = (`notElem` [".","(","["])
+spaceAfter = (`notElem` [".","(","[","\n"])
spaceBefore :: String -> Bool
-spaceBefore = (`notElem` [",",".",":",";","(",")","[","]","{","}"])
+spaceBefore = (`notElem` [",",".",":",";","(",")","[","]","{","}","\n"])
parenth :: Doc -> Doc
parenth ss = doc (showChar '(') . ss . doc (showChar ')')