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.

Converting strings that contain backticks?

See original GitHub issue

This is a bit specific so feel free to *out-of-scope, but it’d be nice if this could turn:

content = '```${'

into

content = `\`\`\`${}`

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JacksonKearlcommented, Nov 12, 2020

That’s a different thing, what I’m taking about is

const a = 'this has some internal `backticks` and I'd like to insert a substitution ${'

to

const a = `this has some internal \`backticks\` and I'd like to insert a substitution ${}`
0reactions
meganroggecommented, Nov 13, 2020

I think this is out of scope for now because the extension primarily focuses on the presence of quotes around the ${ as a precursor to any replacement. Thanks for the idea though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to convert quotes of character elements to be surrounded ...
Your strings don't actually have quotes, they just appear that way on the console. Probably it bothers you that you have to set...
Read more >
Template literals (Template strings) - JavaScript | MDN
Template literals are enclosed by backtick ( ` ) characters instead of double or single quotes. Along with having normal strings, template ...
Read more >
Go 2: allow raw strings containing backticks · Issue #24475 ...
Another workaround would be to choose a different escape character within the strings and apply a strings. Replacer to convert that to Markdown ......
Read more >
String Interpolation in JavaScript - Dmitri Pavlutin
A template string is defined by wrapping a sequence of characters into a pair of backticks `I'm template string` . The template string...
Read more >
Add option to auto-convert quotes to backticks when variable ...
Whenever a string variable is being edited and a variable placeholder ( ${ } ) is found, let the surrounding quotes be automatically...
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