Beautifier breaks ES6 nested template strings
See original GitHub issueHi, I have a file with the following code.
`SELECT
nextval('${this.options.schema ? `${this.options.schema}.` : ''}"${this.tableName}_${this.autoIncrementField}_seq"'::regclass
) nextval;`
When I format the file, that line becomes
`SELECT
nextval('${this.options.schema ? `
$ {
this.options.schema
}.
` : ''}"${this.tableName}_${this.autoIncrementField}_seq"'::regclass
) nextval;`
it is putting a space between $ and {, and that breaks my code.
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Template literals (Template strings) - JavaScript | MDN
In certain cases, nesting a template is the easiest (and perhaps more readable) way to have configurable strings. Within a backtick-delimited ...
Read more >How to nest template strings in ES6? - Stack Overflow
Yes, it's possible, but you had for some reason put the )}) part (that closes the require call, the interpolated value, and the...
Read more >JS-Beautifier/CHANGELOG and JS-Beautifier Releases (Page 5 ...
Wrong indentation for comment after nested unbraced control constructs (#1079) ... Strings (#803); Beautifier breaks ES6 nested template strings (#797) ...
Read more >website/node_modules/js-beautify/CHANGELOG.md - Rdrr.io
JS beautify break the angular compile (#1544); base64 string is broken with ... "0b" Binary Strings (#803); Beautifier breaks ES6 nested template strings...
Read more >js-beautify | Yarn - Package Manager
Changelog. v1.14.7. Doc: Updates web browser implementation examples (#2107); HTML formatter breaks layout by introducing newlines (#1989) ...
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
+1 I have similar problems. Before:
After:
👍 good job