-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add space after '--' in single-line comments #255
Conversation
👋 @brandonchinn178 Reviewer: Please verify the following things have been done, if applicable.
|
a9c377b
to
0c71220
Compare
dropPaddingSpace xs = | ||
case dropWhile T.null xs of | ||
[] -> [] | ||
(x : _) -> | ||
let leadingSpace txt = case T.uncons txt of | ||
Just (' ', _) -> True | ||
_ -> False | ||
dropSpace txt = | ||
if leadingSpace txt | ||
then T.drop 1 txt | ||
else txt | ||
in if leadingSpace x | ||
then dropSpace <$> xs | ||
else xs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is on the Ormolu side. Must've been dropped in a bad merge
https://github.com/tweag/ormolu/blob/54642a7966d1d0787ba84636a2eb52f6729f600e/src/Ormolu/Utils.hs#L89-L102
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably me back when I first implemented multi-line-style output. Good find.
0c71220
to
a9e093f
Compare
a9e093f
to
37acab7
Compare
Nice! This fixes something that has been minorly annoying me for two years. |
Fixes #212