Skip to content

Javascript object keys highlighting #2336

@sanderjson

Description

@sanderjson

Information

  • Language: javascript
  • Plugins: none
  • Version: "prismjs": "^1.20.0"
  • Theme: material-dark

Description
I expect the object keys and curly brace to be highlighted differently.

I am not sure if this is a bug or something that requires custom implementation. (see screenshots)

Code snippet

The code being highlighted incorrectly.
  const test = new TYPE.Application({
    key1: viewDim.x,
    key2: viewDim.y,
    key3: 0x89ddff,
    key4: window.devicePixelRatio || 1,
    key5: resize()
  });

Expected:
prismjs-expected

Rendered:
prismjs-rendered

Inspector:
prism-no-span

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions