vscode-dotenv
vscode-dotenv copied to clipboard
Don't show end-of-line comments as comments
Hello! Thanks for the awesome extension.
Per the attached issue (see below), dotenv does not support end-of-line comments, but this extension shows the comments as if they are not part of the value.
So the code looks like this:

This visually suggests that the value provided to the code is 5000, but the value is actually 3000 # 3 seconds.
Not sure how hard this would be to resolve—if it's not too complex I'd be happy to help by opening a PR.
Thanks!
Got bitten very hard by this, cross-posting issue on a similar package: https://github.com/IronGeek/vscode-env/issues/12
After further investigation, this is probably a parser issue and not a plugin issue. "dotenv" implementations are expected to support inline comments and scrap them correctly.
@pinksynth can you maybe tell which framework/package/setup you were using for parsing the dotenv? And you might want to open an issue there
This can become very problematic when defining an empty environment variable with an explanation comment, leading people to think the value is empty while it's not.