Skip to content

Commit

Permalink
Render line breaks for messages on contact chat
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Dec 10, 2024
1 parent 17ee4c3 commit dc35957
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/chat/Chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ export class Chat extends RapidElement {
word-break: break-word;
}
.message-text {
white-space: pre-line;
}
.chat {
width: 28rem;
border-radius: var(--curvature);
Expand Down Expand Up @@ -760,7 +764,7 @@ export class Chat extends RapidElement {
? html`
<div class="bubble">
${name ? html`<div class="name">${name}</div>` : null}
<div class="message">${message.text}</div>
<div class="message message-text">${message.text}</div>
<!--div>${message.date.toLocaleDateString(
undefined,
Expand Down

0 comments on commit dc35957

Please sign in to comment.