These are chat archives for TypeStrong/atom-typescript

23rd
Mar 2016
Benjamin Bock
@bb
Mar 23 2016 12:41
Hi there! I have found a small syntax highlighting glitch in the ts and tsx syntax which is fine in the js syntax. The code example is actually valid js as well:
    var x = bar ? `/${bar}` : (baz ? `/${baz.bar}` : "");
are those ts.cson grammar files written by hand or generated from some base files? Do they inherit from other files or are they fully self-contained? I'd see if I can fix it myself before creating a ticket.

btw, the issue is that the second string is not highlighted as a string.

`/${baz.bar}`

With the parenthesis removed, the second backtick of the second string is treated as the start of a multi line string which makes all the following lines string-colored

const foo = bar ? `/${bar}` : baz ? `/${baz.bar}` : "";