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.

ES6 backticks not interpreted correctly

See original GitHub issue

For example, save a file as .js containing:

const a = `b = ${b}`;
const b = `http://${host}/mydir/`;
'string';
// comment

In the case of a, the b = is black as if it were code. Only the ${b} is code, and b = is like a string. With b, the // is interpreted as a comment (which it isn’t) and the rest of the line is green.

Compare github’s rendering of the above with FlashDevelop’s.

This is on 5.1.0.3, win7x64sp1 (no updates available when I checked just now.)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Neverbirthcommented, Jan 9, 2017

image

String interpolation works now too in the internal Scintilla build used here. This implementation is generic and would be able to support multiple interpolation syntaxes, so hopefully it will be approved by the Scintilla people. Still a couple of things missing in Haxe, but for most use cases it should be fine:

image

1reaction
Neverbirthcommented, Jan 12, 2017

That’s right, this change will hopefully add string interpolation support in a way Scintilla developers will be able to add it also to other languages.

I cannot give an exact date, but I don’t think it should take too much longer. Most issues found so far have been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Template literals like 'some ${string}' or " ...
JavaScript template literals require backticks, not straight quotation marks. You need to use backticks (otherwise known as "grave accents" ...
Read more >
Why isn't string interpolation working? (Check for backticks)
Hi, i have some practical experience coding, I am not completely new to this. That said, I have noticed the check that determines...
Read more >
ES6 ECMA6 template literals not working in JavaScript
Template literals are surrounded by the backtick (' ') character as opposed to quotes in strings. Placeholders, denoted by the dollar sign and ......
Read more >
backticks not treated as string delimiters (CVE-2023-24538 ...
Templates did not properly consider backticks (`) as Javascript string delimiters, and as such did not escape them as expected.
Read more >
ES6 In Depth: Template strings
But there's a reason these are called “template strings” and not “boring plain old strings that don't do anything special, only with backticks”....
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