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:
1 parent
2fdc812a13
commit
187bac9aa4
1 file changed
+4
@@ -303,6 +303,10 @@ fn toHtml(allocator: std.mem.Allocator, text: []const u8) ![]u8 {
|
||||
try out.append(allocator, c);
|
||||
i += 1;
|
||||
}
|
||||
} else if (c == '\n') {
|
||||
// Rich text collapses raw newlines — explicit <br> survives.
|
||||
try out.appendSlice(allocator, "<br>");
|
||||
i += 1;
|
||||
} else {
|
||||
try out.append(allocator, c);
|
||||
i += 1;
|
||||
|
||||
Reference in new issue
Block a user