microsoft / microsoft/TypeScript-TmLanguage
Javascript highlighting fails when less than symbol ("<") is first char and followed by greater than (">")
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 471
- Forks
- 149
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
TS and JS Grammar Extension version: clicking previous link (in chrome 91.0.4472.114 on macos 10.13.6) gives 404 but searching vscode 1.59.1 extensions for @builtin typescript shows vscode.typescript-language-features 1.0.0 and vscode.typescript 1.0.0. Installing ms-vscode.vscode-typescript-next 4.5.20210902, found in this repo's readme, made no difference.
Code
vscode language mode: JavaScript
const x = 1;
0
< x
&& 1 > 0 // incorrect syntax highlight color coding

The issue seems to be that < x … > is interpreted as some type specification (like in array<int>)?
Compare with following where the last x is replaced with 1.
const x = 1;
0
< 1
&& 1 > 0 // correct syntax highlight color coding

I found #752 but decided to open a new issue.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Start with the JavaScript grammar behavior for the reproduced < x and && 1 > 0 expression, then compare it with the numeric variant in the issue. Review the related #752 issue and the grammar files in this repository to identify the relevant rule. Done means both examples receive correct JavaScript syntax highlighting.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100