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.

Add to string node `raw` contain raw value with escaped special characters

See original GitHub issue

Example we have $a= "foo\nbar": value = foo\nbar; raw = "foo\\nbar"

All popular parser do this https://astexplorer.net/#/gist/070b3c0b39f0af268d909e3ba9efa2a3/2ba4c9d3ab6b3e3cf31f6148a28966c638948790

Ref: https://github.com/prettier/plugin-php/pull/57

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ichiriaccommented, Feb 20, 2018

I vote for raw - more concise

1reaction
ichiriaccommented, Feb 20, 2018

yes, any help would be verry appreciated

Read more comments on GitHub >

github_iconTop Results From Across the Web

String.raw() - JavaScript - MDN Web Docs
It's used to get the raw string form of template literals — that is, substitutions (e.g. ${foo} ) are processed, but escape sequences...
Read more >
How to escape a JSON string containing newline characters ...
I tried escaping the new line character \n to \\n. It is working fine. But i am looking for any JS library which...
Read more >
Escaping, special characters - The Modern JavaScript Tutorial
To use a special character as a regular one, prepend it with a backslash: \. . That's also called “escaping a character”. For...
Read more >
How to escape & unescape HTML characters in string in ...
Let's suppose we have an HTML element as a string: <script> alert("hi") </script>. We can escape the HTML of the string using the...
Read more >
4 Ways to Combine Strings in JavaScript | SamanthaMing.com
Here are 4 ways to combine strings in JavaScript. My favorite way is using Template Strings. Why? Because it's more readable, no backslash...
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