Skip to content

Commit

Permalink
small fix for template strings containing newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Jun 21, 2023
1 parent 7d5df10 commit 7114026
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/js_printer/js_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (p *printer) printUnquotedUTF16(text []uint16, quote rune) {

case '\n':
if quote == '`' {
startLineLength = -i // Printing a real newline resets the line length
js = append(js, '\n')
} else {
js = append(js, "\\n"...)
Expand Down

0 comments on commit 7114026

Please sign in to comment.