Add syntax highlighting for ES6 multiline strings

In the Glitch editor, string values will highlight in a (red-y brown?) color if defined like:

const str1 = "Double Quotes";
const str2 = 'Single Quotes';

but if defined as multiline strings (e.g. Template Literals) Template literals (Template strings) - JavaScript | MDN they don’t highlight as a string and it feels like there is a coding error.

const str3 = `If you speak like
Christopher Walken
There will be
significant gaps
between
chunks of
your sentence`;

It isn’t critical… the code still works… it just looks odd.

(screenshot)
glitch-string-highlight

Hi @scunliffe - you’re right, that does look odd. I’ll let the team know and see if we can get that updated soon!

1 Like

Hello again, @scunliffe - we deployed a change today and now template literals are highlighted like strings. Thanks again for flagging this!

5 Likes