microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.55k stars 29.4k forks source link

Syntax highlight issue in .tsx files using generics #8045

Closed mbilling closed 8 years ago

mbilling commented 8 years ago

Steps to Reproduce:

  1. Create new .tsx file
  2. Paste following
let a = Array<number>();   // Highlight ok here

interface egGenericsInArray {
   a: Array<number>;   // Highlight fails here with generics
}
let s = "anything fails here...";

vscode sh bug

Syntax highlight breaks after Array

benoitv-code commented 8 years ago

Temporary workaround: adding spaces around brackets.

Syntax highlight broken with .tsx files in Visual Studio Code 1.3.0-insider:

interface test {
  a: Array<number>,
  b: string
};

Temporary workaround:

interface test {
  a: Array< number >,
  b: string
};
mbilling commented 8 years ago

One can even just make a single space :)

interface test {
  a: Array< number>,
  b: string
};

Thanks for the workaround!

prencher commented 8 years ago

This is wrecking all kinds of havoc on our code base highlighting in the 1.3.0 release. Can a fix please be prioritized?

psulek commented 8 years ago

Issue is also in today (8th July 2016) release of 1.3 version!

This issue broken whole project based on typescript! Please make it priority fix no 1 !

joaomoreno commented 8 years ago

@aeschli @dbaeumer Forward this to TypeScript if that's the case.

psulek commented 8 years ago

@mbilling Even when space within Array is workaround it is not suitable for project with 200+ ts files where at least half of them has Array. So weird that this issue was reported 15 days ago and was not fixed into final release of 1.3.

Reverting back 1.2...

aeschli commented 8 years ago

I reverted tsx to the version we had in 1.2. ts and js still have the changes for https://github.com/Microsoft/TypeScript-TmLanguage/pull/19 which seems to work well.

mcaballeropinto commented 8 years ago

Awesome!

How can I get the version that contains the patch? When will it be shipped?

Thanks!

mbilling commented 8 years ago

Install insiders version of vscode. Latest update from this morning includes the patch https://code.visualstudio.com/insiders

psulek commented 8 years ago

@mbilling Do you release "fix" release as public for this same as was for 1.2.1 version? I think its breaking critical bug to be able to use public 1.3 release without this fix!

mbilling commented 8 years ago

Agree. I'm just not in the release chain. I only raised the issue. I guess someone is on it - or i hope :-)

aeschli commented 8 years ago

We will have a release with the fix in the coming days.

ianks commented 8 years ago

@aeschli I am still having this issue. I think we should re-open it:

img

Version info:

Version 1.5.2
Commit 66f37fd2a99eb9d628dd374d81d78835b410c39b
Date 2016-09-12T13:22:54.636Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0
joaomoreno commented 8 years ago

This is what I see:

image

1.6.0-insider 0619ede1e469ed23fbb214eaa0377625a402ca87

Seems to be fixed in latest Insiders.

Meowtimer commented 8 years ago
screen shot 2016-09-25 at 4 42 01 pm screen shot 2016-09-25 at 4 41 40 pm
joaomoreno commented 8 years ago

ping @aeschli

jwulf commented 7 years ago

Broken for me in a .tsx file.

Version 1.9.0-insider (1.9.0-insider)

f2379e882b415e2c503a723776c4431a40d7c1aa

2017-01-02T07:03:01.993Z

screen shot 2017-01-02 at 10 41 35 pm screen shot 2017-01-02 at 10 41 41 pm

Adding spaces before, after, and during the angle brackets does not work around it for me.

jwulf commented 7 years ago

Removing the space between the component and the angle bracket works around it!

screen shot 2017-01-03 at 10 09 12 am