on master help sign in
Print multiline comments without changing the contents

Changing the relative position of the closing brace can cause whitespace changes.

commitc3d69d58534a51b79d06073a313e210a95572bf0 authorUtku Demir <me@utdemir.com> dateThu 15 Aug 2019, 15:00 (7 years ago) parentb3f6e1b
3 files changed+11−1
data/examples/declaration/value/function/operators-out.hs+5 data/examples/declaration/value/function/operators.hs+5 src/Ormolu/Printer/Comments.hs+1−1
data/examples/declaration/value/function/operators-out.hs+5
@@ -7,6 +7,11 @@ main =
77 $ baz -- bar
88 -- baz
99
10+bar
11+ $ {- foo
12+ -}
13+ bar
14+
1015f =
1116 Foo <$> bar
1217 <*> baz
data/examples/declaration/value/function/operators.hs+5
@@ -6,6 +6,11 @@ main =
66 bar $ -- bar
77 baz -- baz
88
9+bar $
10+ {- foo
11+ -}
12+ bar
13+
914f =
1015 Foo <$> bar
1116 <*> baz
src/Ormolu/Printer/Comments.hs+1−1
@@ -221,6 +221,6 @@ commentFollowsElt ref mnSpn meSpn mlastSpn (L l comment) =
221221
222222spitComment :: Comment -> R ()
223223spitComment =
224− sequence_ . NE.intersperse newline . fmap f . coerce
224+ sitcc . sequence_ . NE.intersperse newline . fmap f . coerce
225225 where
226226 f x = ensureIndent >> spit (T.pack x)