Big disclaimer: this does not work 100% yet (there are some instances where the highlighting falls apart, particularly when things get deeply nested). But this is what I managed to adapt from the fcurella/jsx-lexer:
Hi Mandi,
so nice of you to share this. I've touched it just ever slightly to allow the use of dashes in the component name (e.g. <sp-button>), I've forked your gist here: gist.github.com/undavide/a225bd6fb...
Thanks again!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Davide,
Big disclaimer: this does not work 100% yet (there are some instances where the highlighting falls apart, particularly when things get deeply nested). But this is what I managed to adapt from the fcurella/jsx-lexer:
gist.github.com/mandiwise/452b23fd...
It's on my long-term to-do list to completely rewrite this lexer from the ground-up, but I don't have the bandwidth for it at the moment.
Hi Mandi,
so nice of you to share this. I've touched it just ever slightly to allow the use of dashes in the component name (e.g.
<sp-button>
), I've forked your gist here: gist.github.com/undavide/a225bd6fb...Thanks again!