Fix messages white-space

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2021-12-12 18:45:43 +05:30
parent 88a988d876
commit e2b347c783
2 changed files with 8 additions and 4 deletions

View file

@ -169,7 +169,7 @@ const MessageBody = React.memo(({
const content = isCustomHTML
? twemojify(sanitizeCustomHtml(body), undefined, true, false)
: twemojify(body, undefined, true);
: <p>{twemojify(body, undefined, true)}</p>;
return (
<div className="message__body">

View file

@ -180,6 +180,10 @@
.message__body {
word-break: break-word;
& > .text > * {
white-space: pre-wrap;
}
& a {
word-break: break-word;
}
@ -331,19 +335,19 @@
& h1,
& h2 {
color: var(--tc-surface-high);
margin: var(--sp-extra-loose) 0 var(--sp-normal);
margin: var(--sp-loose) 0 var(--sp-normal);
line-height: var(--lh-h1);
}
& h3,
& h4 {
color: var(--tc-surface-high);
margin: var(--sp-loose) 0 var(--sp-tight);
margin: var(--sp-normal) 0 var(--sp-tight);
line-height: var(--lh-h2);
}
& h5,
& h6 {
color: var(--tc-surface-high);
margin: var(--sp-normal) 0 var(--sp-extra-tight);
margin: var(--sp-tight) 0 var(--sp-extra-tight);
line-height: var(--lh-s1);
}
& hr {