aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:38:49 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:38:49 -0800
commit1a60d7df9836df2ffc6a7a02ff4f90f3cccf599f (patch)
treef4e5a698bd2773f55e3698f274b1bbea76b26c1a /src
parent89a7e3bf2f45f94420dba8f24bdd3d6de7480d31 (diff)
downloadbun-1a60d7df9836df2ffc6a7a02ff4f90f3cccf599f.tar.gz
bun-1a60d7df9836df2ffc6a7a02ff4f90f3cccf599f.tar.zst
bun-1a60d7df9836df2ffc6a7a02ff4f90f3cccf599f.zip
[JS Printer] Fix bug with template literals
Diffstat (limited to 'src')
-rw-r--r--src/js_printer.zig12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/js_printer.zig b/src/js_printer.zig
index 06e309665..2aa800756 100644
--- a/src/js_printer.zig
+++ b/src/js_printer.zig
@@ -1473,11 +1473,7 @@ pub fn NewPrinter(
p.print("`");
if (e.head.isPresent()) {
- if (e.tag != null) {
- p.print(e.head.utf8);
- } else {
- p.printStringContent(&e.head, '`');
- }
+ p.printStringContent(&e.head, '`');
}
for (e.parts) |part| {
@@ -1485,11 +1481,7 @@ pub fn NewPrinter(
p.printExpr(part.value, .lowest, ExprFlag.None());
p.print("}");
if (part.tail.isPresent()) {
- if (e.tag != null) {
- p.print(part.tail.utf8);
- } else {
- p.printStringContent(&part.tail, '`');
- }
+ p.printStringContent(&part.tail, '`');
}
}
p.print("`");