Skip to content

Add space after '--' in single-line comments#255

Merged
brandonchinn178 merged 1 commit intomainfrom
single-line-comment
Nov 23, 2022
Merged

Add space after '--' in single-line comments#255
brandonchinn178 merged 1 commit intomainfrom
single-line-comment

Conversation

@brandonchinn178
Copy link
Copy Markdown
Collaborator

Fixes #212

@github-actions
Copy link
Copy Markdown

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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

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