diff options
Diffstat (limited to 'src/GF/Infra/CompactPrint.hs')
| -rw-r--r-- | src/GF/Infra/CompactPrint.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/GF/Infra/CompactPrint.hs b/src/GF/Infra/CompactPrint.hs index 5625041cd..7b37679ee 100644 --- a/src/GF/Infra/CompactPrint.hs +++ b/src/GF/Infra/CompactPrint.hs @@ -5,7 +5,9 @@ compactPrint = compactPrintCustom keywordGF (const False) compactPrintGFCC = compactPrintCustom (const False) keywordGFCC -compactPrintCustom pre post = tail . concat . map (spaceIf pre post) . words +compactPrintCustom pre post = dps . concat . map (spaceIf pre post) . words + +dps = dropWhile isSpace spaceIf pre post w = case w of _ | pre w -> "\n" ++ w |
