question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript syntax highlighting issue

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
NobleUpliftcommented, Apr 24, 2019

It definitely causes a crash in 3.3.3333 and 3.4.1. Those are the last two versions I used. If I get more information I’ll make it into a separate issue.

0reactions
NobleUpliftcommented, May 10, 2019

Done. Tested again and created issue #718.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest version (5.0.221116) breaks syntax highlighting #43
The issue Syntax highlighting stopped working for TypeScript files after last update. v5.0.20221115: v5.0.20221116: Logs 2022-11-16 ...
Read more >
Visual Studio Code syntax highlighting is not working for ...
The current version (v5.0.20221116) for JavaScript and TypeScript Nightly seems to be breaking the syntax highlighting. Downgrading ...
Read more >
TypeScript syntax highlighting partially broken
Intellisense or code analysis works fine, it really is just issue with syntax highlighting. Visual Studiowindows 10.0typescriptvisual studio 15.1.2.
Read more >
Typescript syntax highlighting rules | Crucible - Jira - Atlassian
bash,highlighthighlighterjac-cleanup-phase7syntax-highlighting ... Atlassian will continue to watch this issue for further updates, so please feel free to ...
Read more >
[vim/vim] TypeScript syntax highlighting broken on template ...
The line thisFunctionIsShownAsLiteralButItIsntOne(); should be highlighted as a function but it is shown as a literal. The error happens in nvim ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found