microsoft / microsoft/TypeScript-Sublime-Plugin

Typescript syntax highlighting issue

Aperta
#714 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.7k
Fork
236
Merge medio
21g 13h
PR unite (30g)
1

Descrizione

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;
}

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre il problema in Sublime Text 3 build 3207 con il plugin TypeScript v3.4.1 usando l’esempio di codice fornito e confrontare le due forme di _.each. Tracciare la gestione dell’evidenziazione della sintassi del plugin per il callback inline e verificare che l’evidenziazione rimanga corretta nei blocchi successivi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.