overlay: preserve explicit newlines in bubbles (raw \n to <br>)

Qt rich text collapses raw newlines to whitespace; convert before render.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
This commit is contained in:
pierreandLetta Code committed 2026-09-01 23:20:31 +03:00
1 parent 2fdc812a13
commit 187bac9aa4
1 file changed
+4
+4
View File
@@ -303,6 +303,10 @@ fn toHtml(allocator: std.mem.Allocator, text: []const u8) ![]u8 {
try out.append(allocator, c); try out.append(allocator, c);
i += 1; i += 1;
} }
} else if (c == '\n') {
// Rich text collapses raw newlines — explicit <br> survives.
try out.appendSlice(allocator, "<br>");
i += 1;
} else { } else {
try out.append(allocator, c); try out.append(allocator, c);
i += 1; i += 1;