allan2 / dotenvy

A well-maintained fork of the dotenv crate
MIT License
664 stars 40 forks source link

Fix comments reggression #18

Closed BlackDex closed 1 year ago

BlackDex commented 2 years ago

This PR fixes #12

Added a WhiteSpace ParseState and check for a comment after a whitespace. Also return the current position of the iter to correctly strip the comments of from the line to prevent quoted comments or non-whitespace surrounded hash chars.

Also updated the tests to match these cases. And added an example code to easily show the output.