You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strange colourisation of template strings when "#/" present after first placeholder #3630
I've noticed some odd behavior with the syntax colourisation for template strings in Visual Studio 2013 (using TypeScript 1.4 plugin). It occurs when the string "#/" is present within the template string after at least one placeholder is present. I realise reading that is as clear as mud so look at the screenshot below for clarification:
As you can see the first 2 examples colourise in the fashion you would hope. The 3rd example behaves in an unexpected fashion after the "#/". Here's the code you can use to reproduce it with:
TypeScript 1.4 didn't have proper template string colorization support in VS2013, so I believe it thinks it's seeing the identifier _well_things_look_a_little_odd_colour_wise_after_the_, followed by invalid token #, and finally unterminated regex /_${"That_is_what_I_think_anyway"};`
Activity
DanielRosenwasser commentedon Jun 25, 2015
TypeScript 1.4 didn't have proper template string colorization support in VS2013, so I believe it thinks it's seeing the identifier
_well_things_look_a_little_odd_colour_wise_after_the_, followed by invalid token#, and finally unterminated regex/_${"That_is_what_I_think_anyway"};`If you're curious for a more technical explanation, you can check this page out on our wiki.
The short answer is, this has been fixed to a reasonable extent and will be available in TypeScript 1.5.
Marking this as a duplicate of #1477.
johnnyreilly commentedon Jun 25, 2015
Ah great! Thanks for the detail.
DanielRosenwasser commentedon Jun 25, 2015
No prob; while 1.5 proper should be out pretty soon, you can use the beta in the mean time.