Add to string node `raw` contain raw value with escaped special characters
See original GitHub issueExample 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:
- Created 6 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I vote for
raw
- more conciseyes, any help would be verry appreciated