stackbuilders / dotenv-hs

Load environment variables from dotenv files for Haskell
https://hackage.haskell.org/package/dotenv
MIT License
65 stars 14 forks source link

fix: Correctly parse newline and multiline strings in dotenv files #192

Closed FranzGB closed 1 month ago

FranzGB commented 4 months ago

Proposed Changes

This pull request addresses issue #186. I wasn't sure if we should parse it as a newline or as a literal string. I decided to go with the latter. But happy to change it if needed. Let me know if you have any feedback.

Additionally, I noticed that our current tests depend heavily on the index of parsed (key, value) pairs, which could make them fragile and prone to breaking with minor changes in the fixture. I propose that we refactor these tests to make them more robust and resilient to changes. I look forward to hearing your thoughts on this.