-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Should allow comment at end of lines #156
Comments
I like this idea, I would be open to merging a PR for this. |
I played a little with it and was wondering if you had already taken into account the opportunity of using a parser generator with an expression grammar, something like peg.js. I experimented with it and already implemented the comment-at-end-of-line feature using peg.js. If you want to take a look you can find it here. |
Why are comments needed inline? Please expand on its usefulness. |
They probably don't qualify as needed, maybe they're more like a nice-to-have: in certain cases some developers might prefer being able to write a short comment on the same line, instead of having to add a new line above (unfortunately I don't have stats, I can only anecdotally say I've had that want). My specific context was during the preparation of a Shell script allows #-comments midway through the line, and it's plausible that this module might consume environment variable definition files originally written for Shell, so for me inline comments being unsupported rather than supported was the part that felt surprising. |
dotenv doesn't need to support inline comments for a sample file to get its point across. If there's mass confusion, use the comments that are already supported. |
Okay. In case anyone else is specifically looking for this feature in future, you can use this fork here: sneakertack/dotenv#altparser. Additional context can also be found at #158, be sure you understand the differences before installing. |
I think it would be useful to be able to have comments at the end of lines. E.g.:
The text was updated successfully, but these errors were encountered: