Remove assertion in js printer triggering for unicode comments (#15143)

This commit is contained in:
pfg
2024-11-14 00:14:43 -08:00
committed by GitHub
parent fdd8d35845
commit d8987ccdb8
2 changed files with 9 additions and 3 deletions

View File

@@ -933,9 +933,6 @@ fn NewPrinter(
p.writer.print(@TypeOf(span), span);
},
else => {
if (Environment.allow_assert and ascii_only) {
for (str) |char| std.debug.assert(char > 0 and char < 0x80);
}
p.writer.print(StringType, str);
},
}

View File

@@ -93,4 +93,13 @@ error: Hello World`,
},
},
});
itBundled("bun/unicode comment", {
target: "bun",
files: {
"/a.ts": /* js */ `
/* æ */
`,
},
run: { stdout: "" },
});
});