Skip to content

Commit eb3fa83

Browse files
committed
PrettyPrint: Avoid trailing whitespace after empty cases
1 parent ca4e35d commit eb3fa83

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Language/ECMAScript3/PrettyPrint.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ instance Pretty (VarDecl a) where
163163
instance Pretty (CaseClause a) where
164164
prettyPrint c = case c of
165165
CaseClause _ e ss ->
166-
text "case" <+> ppExpression True e <> colon </> nest 2 (prettyPrint ss)
167-
CaseDefault _ ss -> text "default:" </> nest 2 (prettyPrint ss)
166+
text "case" <+> ppExpression True e <> colon <> softbreak <> nest 2 (prettyPrint ss)
167+
CaseDefault _ ss -> text "default:" <> softbreak <> nest 2 (prettyPrint ss)
168168

169169
instance Pretty InfixOp where
170170
prettyPrint op = text $ case op of

0 commit comments

Comments
 (0)