styled-components / vscode-styled-components

Syntax highlighting for styled-components
MIT License
917 stars 117 forks source link

Remove support for styled(Component)(` #446

Open oliviertassinari opened 3 months ago

oliviertassinari commented 3 months ago

Describe the bug (including copyable syntax)

Today vscode-styled-components highlights the styled(Component)( pattern

SCR-20240528-oyqe

like it does with the styled(Component)` pattern:

SCR-20240528-oyrq

But should it?

Expected behavior

No highlights of the styled(Component)` pattern, per https://github.com/hudochenkov/postcss-styled-syntax/issues/30#issuecomment-2134132554

Build environment (please complete the following information):

jasonwilliams commented 3 months ago

I see, this should be a straight forward fix to be honest so please have a stab at it. (I don't have time to contribute to this project anymore but I can help)

I would assume this is adjusting the regex here or here until it doesn't do that.

There is a contributing guide here (follow the syntax section).

But to be honest, it should be as simple as loading this into regex101 and fiddling about with it until it doesn't match, then add it back in and check tests still pass.

This is a good starting point: https://regex101.com/r/RmDFJ8/1