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

JSX - Nested objects inside props #2598

Closed
kevinalexandermanson opened this issue Oct 20, 2020 · 1 comment
Closed

JSX - Nested objects inside props #2598

kevinalexandermanson opened this issue Oct 20, 2020 · 1 comment

Comments

@kevinalexandermanson
Copy link

Information

  • Language: JSX
  • Plugins: None

Description
Nested objects inside attributes/props in JSX seems to break the syntax highlighting. Based on reading some other issues it seems like maybe this is not something that would be supported, but thought I would just confirm that this is the case.

Code snippet

The code being highlighted incorrectly.
<Component one={{ two: { three: {} } }} />

Screenshot

image

Expected (without the 3rd level of nesting)
image

@RunDevelopment
Copy link
Member

This is one of the core limitations of Prism being a regex-based: we can't do nested structures. We usually work around this by supporting some number of levels of nestedness but it seems like you found out how many levels we support ;).

Unfortunately, this isn't something we can (easily) fix.

We already have a similar issue, so I'll close this as a duplicate.

Duplicate of #1548

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