Skip to content

Commit 3290c0c

Browse files
committed
fix: line break handling in chat
1 parent cddc9ee commit 3290c0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/Chat.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ export default function Chat() {
9292
: "justify-start"
9393
}`}
9494
>
95-
<div
96-
className={`max-w-[80%] rounded-lg px-4 py-2 ${
95+
<pre
96+
className={`max-w-[80%] rounded-lg px-4 py-2 whitespace-pre-wrap ${
9797
message.user === "user"
9898
? "bg-primary text-primary-foreground"
9999
: "bg-muted"
@@ -115,7 +115,7 @@ export default function Chat() {
115115
/>
116116
)
117117
))}
118-
</div>
118+
</pre>
119119
</div>
120120
))
121121
) : (

0 commit comments

Comments
 (0)