diff --git a/src/Nixfmt/Pretty.hs b/src/Nixfmt/Pretty.hs index dd95e186..181435dd 100644 --- a/src/Nixfmt/Pretty.hs +++ b/src/Nixfmt/Pretty.hs @@ -534,7 +534,7 @@ instance Pretty Expression where -- not chainable binary operators: <, >, <=, >=, ==, != pretty (Operation a op@(Ann _ op' _) b) | op' == TLess || op' == TGreater || op' == TLessEqual || op' == TGreaterEqual || op' == TEqual || op' == TUnequal - = pretty a <> softline <> pretty op <> hardspace <> pretty b + = group $ pretty a <> group' RegularG (line <> pretty op <> hardspace <> pretty b) -- all other operators pretty operation@(Operation _ op _) = let