Skip to content
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

Merged
merged 1 commit into from Nov 23, 2022

Conversation

brandonchinn178
Copy link
Collaborator

Fixes #212

@github-actions
Copy link

github-actions bot commented Nov 13, 2022

👋 @brandonchinn178
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines in DEVELOPER.md. We will review it as soon as possible!

Reviewer: Please verify the following things have been done, if applicable.

  • A file has been added to changelog.d/
  • "Configuration > Available options" section in README.md has been updated
  • "Configuration > Specifying configuration" section in README.md has been updated
  • fourmolu.yaml updated to stay in sync with config in README.md
  • Tests have been added

@brandonchinn178 brandonchinn178 force-pushed the single-line-comment branch 2 times, most recently from a9c377b to 0c71220 Compare November 13, 2022 01:55
Comment on lines +89 to +104
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@georgefst georgefst Nov 23, 2022

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.

@georgefst
Copy link
Collaborator

Nice! This fixes something that has been minorly annoying me for two years.

@brandonchinn178 brandonchinn178 merged commit b243355 into main Nov 23, 2022
@brandonchinn178 brandonchinn178 deleted the single-line-comment branch November 23, 2022 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting multiline haddock module description with markup creates parse error
2 participants