don't escape newlines in multiline string literals

This commit is contained in:
Luke Boswell 2025-11-28 11:40:15 +11:00
parent efac5c073a
commit 056b5e2a56
No known key found for this signature in database
GPG key ID: 54A7324B1B975757

View file

@ -5752,7 +5752,7 @@ fn extractMultilineStringSegments(self: *Self, parts: []const AST.Expr.Idx) std.
.string_part => |sp| {
// Add newline between consecutive string parts
if (last_string_part_end != null) {
try self.addStringLiteralToScratch("\\n", .{ .start = last_string_part_end.?, .end = part_node.to_tokenized_region().start });
try self.addStringLiteralToScratch("\n", .{ .start = last_string_part_end.?, .end = part_node.to_tokenized_region().start });
}
// Get and process the raw text of the string part