microsoft / microsoft/TypeScript-Sublime-Plugin

Typescript syntax highlighting issue

Offen
#714 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
1.7k
Forks
236
Ø Merge
21 T. 13 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das Problem in Sublime Text 3 Build 3207 mit dem TypeScript-Plugin v3.4.1 unter Verwendung des bereitgestellten Codebeispiels und vergleiche die beiden _.each-Formen. Verfolge die Syntaxhervorhebungsbehandlung des Plugins für den Inline-Callback und überprüfe, dass die Hervorhebung in nachfolgenden Blöcken korrekt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.