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

] and } are highlighted differently from their corresponding opening brackets #6

Open
belkka opened this issue Dec 25, 2023 · 0 comments

Comments

@belkka
Copy link

belkka commented Dec 25, 2023

Apparently, syntax highlighting assumes presence of commas between list elements, which are optional in hjson.

I expect a closing bracket (of a list or object) to be displayed in same colors as a corresponding opening bracket.

Instead, closing } of some objects within a list AND the ] of that list are highlighted rather like string literals (at least in my colorscheme). To be precise, wrong } highlighting happens for objects:

  1. followed by another object or string, but
  2. not separated from it with comma nor comment.

Sample

According to https://hjson.github.io/try.html, this is a valid list of 6 elements — 5 objects and 1 string:

[
    {x:1}
    {y:2} {z:3}
    {z:4}
    "You are in a debris room filled with stuff washed in from the surface."
    {y:5}
]

Demo

asciicast

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

1 participant