Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Request] Add JSON5 as an alias for JavaScript #4255

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
kshetline opened this issue May 6, 2025 · 0 comments · May be fixed by #4256
Open

[Request] Add JSON5 as an alias for JavaScript #4255

kshetline opened this issue May 6, 2025 · 0 comments · May be fixed by #4256
Labels
enhancement An enhancement or new feature parser

Comments

@kshetline
Copy link

I'm submitting this issue as a small enhancement request, hoping it doesn't qualify as a request for a whole new language.

Since valid JSON5 is also valid JavaScript at the same time, the current JavaScript parser does a good job with highlighting it – better than JSON/JSONC.

I'm using highlight.js to enhance Markdown syntax highlighting within code fences, where users would be expected to annotate their code fences like this:

Image

...and not tag them as javascript instead, just to get the content parsed correctly.

The solution you'd prefer / feature you'd like to see added...

A simple change to the alias list in javascript.js, which I'm prepared to submit myself.

Any alternative solutions you considered...

n/a

@kshetline kshetline added enhancement An enhancement or new feature parser labels May 6, 2025
@kshetline kshetline linked a pull request May 6, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant