Skip to content

Conversation

@mbartlett21
Copy link
Contributor

@mbartlett21 mbartlett21 commented Aug 2, 2024

This should fix #254.

I also fixed another bug while I was at it. Gren was silently dropping the last newline if the string didn't end with a newline.

Copy link
Member

@robinheghan robinheghan left a comment

Choose a reason for hiding this comment

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

Good first attempt, but I think we can do better.

Also, please add your name to the CONTRIBUTORS file, if it isn't there already.

@mbartlett21 mbartlett21 force-pushed the multiline-string-crlf branch from fe6da0e to e004486 Compare August 9, 2024 07:21
They are always encoded in the end result as just \n
@mbartlett21 mbartlett21 force-pushed the multiline-string-crlf branch from e004486 to 4961a54 Compare August 9, 2024 07:23
@robinheghan
Copy link
Member

Code formatting check fails.

To apply correct code formatting, install ormolu and run ormolu --mode inplace $(git ls-files '*.hs')

@mbartlett21
Copy link
Contributor Author

@robinheghan
I've added another test for if it doesn't end with a newline, which was previously wrong.
I.e.

"""testing
testing"""

previously dropped the newline

Copy link
Member

@robinheghan robinheghan left a comment

Choose a reason for hiding this comment

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

Thank you for this <3

@robinheghan robinheghan merged commit 42ce9c0 into gren-lang:main Aug 9, 2024
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.

Multi-line strings don't work on Windows

2 participants