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

Add TSX support for <script type="tsx"> #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

callumacrae
Copy link

Previously, TSX wasn't being highlighted as when in typescript it requires the language to be typescriptreact, not typescript.

I've changed it so that the typescript matcher no longer matches type="tsx", and there's a new matcher to handle that.

Honestly I have absolutely no idea what's going on in that regex so might have got something wrong. I've manually tested the expression against a few different script type types but don't 100% understand the intention of the original expression (which also matches type="tshelloworld").

Previously, TSX wasn't being highlighted as when in typescript it requires the language to be `typescriptreact`, not `typescript`.

I've changed it so that the `typescript` matcher no longer matches `type="tsx"`, and there's a new matcher to handle that.

Honestly I have absolutely no idea what's going on in that regex so might have got something wrong. I've manually tested the expression against a few different script type types but don't 100% understand the intention of the original expression (which also matches `type="tshelloworld"`).
@callumacrae
Copy link
Author

unless i'm missing something, the test failure is totally unrelated?

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.

1 participant