Skip to content
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

Don't show end-of-line comments as comments #31

Open
pinksynth opened this issue Feb 1, 2022 · 2 comments
Open

Don't show end-of-line comments as comments #31

pinksynth opened this issue Feb 1, 2022 · 2 comments

Comments

@pinksynth
Copy link

pinksynth commented Feb 1, 2022

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:
image

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!

@pinksynth pinksynth changed the title Don't show inline comments as comments Don't show end-of-line comments as comments Feb 1, 2022
@eric-burel
Copy link

Got bitten very hard by this, cross-posting issue on a similar package: IronGeek/vscode-env#12

@eric-burel
Copy link

eric-burel commented Nov 19, 2022

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.

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

2 participants