The coloring is broken because closing brace after hoverEffect is closing embedded value in the template literal. It needs to handle matching parenthesis inside JavaScript code inside the escape value of template literals.
EDIT: it seems that both examples are broken but in a different ways. Backtick inside ${ } closes backtick from the beginning.
I have this case:
I work with styled-components in ReactJS and I have this code:
This works fine, but when I use destructure of props in a function:
The coloring is broken because closing brace after
hoverEffect
is closing embedded value in the template literal. It needs to handle matching parenthesis inside JavaScript code inside the escape value of template literals.EDIT: it seems that both examples are broken but in a different ways. Backtick inside
${ }
closes backtick from the beginning.