-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
In JSX components, spreading props breaks component's syntax highlighting. #2753
Copy link
Copy link
Closed
Labels
Description
Information
- Language: [JSX]
- Plugins: I'm using prism through React Markdown and React Syntax Highlighter
Description
In JSX components, spreading props breaks component's syntax highlighting.
Code snippet
Here's Github's version
const Test = () => {
return (
<div>
<Button {...{onClick, disabled}}>
Click (Wrong Highlighting)
</Button>
<Button onClick={onClick} disabled={disabled}>
Click (Correct highlighting)
</Button>
</div>
)
}Screenshots (images)
Prism's broken syntax highlighting, breaks the colors of the first component
Github correctly highlights it, the first component is highlighted correctly
I have seen the issues regarding Nested objects inside props and I'm thinking they might be related.
#2598
#1548
Is this expected / known behavior, and is this going to be fixed at all? Thanks!
Reactions are currently unavailable

