Closed kitten closed 7 years ago
First of all: Thank you for acknowledging me and my humble project. 😄 Second: Even if it were too much trouble, I'd make sure that I give everything to make sure SC looks and handles the best way it can.
Third and only important statement: I don't handle separate keywords. I check for statements such as import ... styled-components
and require ... styled-components
and then inject CSS rules into template string blocks (and inside CSS blocks to enable nested blocks). Thus no matter how the API of SC looks, as long as you use CSS definitions inside tagged template literals the highlighting should be safe. (Also I just tested the above examples and they seem to have no negative effect of the syntax highlighting. 😄 )
Aaaaaaallllso... now that I think about it, I can support other libraries, that use this way of marking up CSS in JS. (Like jxnblk/diet-cola.) Thanks for the tip. 😄 👍
Awesome work!
In v2 (which will be officially released shortly, and is currently in RC) we have a few new methods which will need to be added to the syntax highlighting. The three methods are:
.extend
.extendWith()
SC.attrs({})
I hope this isn't too much trouble :)