microsoft / microsoft/TypeScript-Sublime-Plugin

Typescript syntax highlighting issue

Ouverte
#714 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
JavaScript
Étoiles
1.7k
Forks
236
Merge moyen
21 j 13 h
PR mergées (30 j)
1

Description

Hi! I found a syntax highlighting condition that breaks highlighting for all subsequent blocks of code. Please let me know if you need more information.

Sublime Text 3: 3.2.1 build 3207
TypeScript plugin: v3.4.1

Image:
Screen Shot 2019-04-10 at 9 15 19 AM

Code:

if (something) {
    // if the function param is broken onto a new line then the following block's syntax is highlighted correctly
    _.each([], (item) => { 
        if (item) { count++; }
    });
}

// here to demonstrate that syntax highlighting works as expected
if (invalid) {
    let something = true;
    const something = true;
    this.something = true;
}

// the problematic line has to be within a block to demonstrate the issue
if (something) {
    // if the function param is all in one line then the following blocks lose syntax highlighting
    _.each([], (item) => { if (item) { count++; } });
    // sytax highlighting still works for the current block
    let something = true;
    const something = true;
    this.something = true;
}

// here to demonstrate that syntax highlighting does NOT work as expected
if (invalid) {
    let something = true;
    const something = true;
    this.something = true;
}

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduire le problème dans Sublime Text 3 build 3207 avec le plugin TypeScript v3.4.1 en utilisant l’exemple de code fourni, en comparant les deux formes de _.each. Suivre la gestion de la coloration syntaxique du plugin pour le callback inline et vérifier que la coloration reste correcte dans les blocs suivants.

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
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.