Skip to content

godotenv removes trailing #.. as comment #147

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

Open
ndeloof opened this issue Jun 29, 2021 · 4 comments
Open

godotenv removes trailing #.. as comment #147

ndeloof opened this issue Jun 29, 2021 · 4 comments

Comments

@ndeloof
Copy link

ndeloof commented Jun 29, 2021

Comments in .env files must be preceded by a space character
godotenv looking for comments delimiter must check previous character is a blanck one

see https://github.com/theskumar/python-dotenv/blob/master/tests/test_parser.py#L20-L23 as an explicit test case to check a=b#c should be parsed as key=a, value=b#c, but a=b #c should be parsed as key=a, value=b.

@gzapatas
Copy link

gzapatas commented Jul 1, 2021

image
Hello, I have made a fix by myself and that let you make your string variables with # readable without single or double quotation.
You should change the function parseLine. It makes that library works like nodejs dotenv library.

@ndeloof
Copy link
Author

ndeloof commented Jul 1, 2021

@gzapatas nice. Why don't you propose this as a pull-request?

@decentral1se
Copy link

Just to chime in and +1 this, we also need this 👍

@decentral1se
Copy link

Tried Autonomic-Cooperative@075e12e but actually Autonomic-Cooperative@b031ea1 was the winner 🙃

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

No branches or pull requests

3 participants