Skip to content

Commit 05585b4

Browse files
committed
Refactor code.js to improve syntax highlighting colors
1 parent 5c93053 commit 05585b4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/mdx/code.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,15 @@ function Code({className = '', prompt, children}) {
118118
key={key}
119119
{...{
120120
...getTokenProps({token, key}),
121-
style:
122-
getTokenProps({token, key}).className === 'token comment'
123-
? {...getTokenProps({token, key}).style, color: '#747458'}
124-
: getTokenProps({token, key}).style,
121+
style: {
122+
...getTokenProps({token, key}).style,
123+
color:
124+
getTokenProps({token, key}).className === 'token comment'
125+
? '#747458'
126+
: getTokenProps({token, key}).className === 'token parameter variable'
127+
? '#277d7b'
128+
: getTokenProps({token, key}).style.color,
129+
},
125130
}}
126131
/>
127132
))}

0 commit comments

Comments
 (0)