Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSX: Add support for plain text inside tags #1357

Merged
merged 5 commits into from
Mar 20, 2018

Conversation

Golmote
Copy link
Contributor

@Golmote Golmote commented Mar 14, 2018

This is a second attempt at fixing #1294, based on a great idea from @supnate (#1342 (comment)).

It uses a new hook to post-process the tokenized code and drop tokens that were wrongly highlighted.

Unlike #1304, it should provide full support for plain text, here, since we keep count of the opening tags and braces.

Please give me your thoughts about this. @m-allanson, @LeaVerou, @mAAdhaTTah, @vkbansal

@vkbansal
Copy link
Contributor

LGTM. Nice work!

@LeaVerou
Copy link
Member

Me too! Thank you!

@supnate
Copy link

supnate commented Mar 15, 2018

Looks good, quite neat code! Thanks @Golmote ! Glad to see my approach could help. Just one comment: could you make jsx text a special token type (like jsx-text) rather than plain text? So that we could differentiate it from other text like variable definition, then they can have different colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants