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

Incorrect JSON syntax highlighting following non-quoted environment variable #228

Open
salittle0 opened this issue Aug 20, 2024 · 2 comments

Comments

@salittle0
Copy link

The JSON syntax highlighting breaks after a line that includes a non-quoted environment variable (e.g. a bool/number). Using a misc. JSON body as an example:
image

You can see the highlighting is fine for non-environment variables, and for an environment variable that is contained within quotes, but fails after {{env_num}} where it highlights the key of the following line. The same behaviour occurs for bool/null.

@flawiddsouza
Copy link
Owner

flawiddsouza commented Aug 21, 2024

I don't think it's possible to get code mirror to treat the json as valid without the quotes. Not sure if we can fix this without writing a custom syntax highlighter for this.

The same behaviour occurs for bool/null

That doesn't sound right. Highlighting seems correct in above screenshot after bool / null. As it's valid json.

@salittle0
Copy link
Author

Sorry, confusing wording. I meant the same occurs for environment variables that are boolean/null, which is exactly what I'd expect.

I figured it might be wrapped up in another package—I guess you could call it a feature request then, but I don't think it's all that important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants