1
0
forked from GitHub/gf-core

No spaces after newlines in JavaScript pretty-printer.

This commit is contained in:
bringert
2007-01-23 16:31:44 +00:00
parent 979a54af35
commit 780d0b2c42

View File

@@ -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 ')')