fix wrap of long words

This commit is contained in:
Martti Malmi 2023-06-28 17:10:55 +03:00
parent d8b616b4bd
commit 32fa6bf3f2
2 changed files with 8 additions and 2 deletions

View File

@ -46,4 +46,10 @@ img, video {
.pb-safe-area {
padding-bottom: env(safe-area-inset-bottom);
}
.preformatted-wrap {
white-space: pre-wrap;
overflow-wrap: break-word;
word-break: break-all;
}

View File

@ -324,8 +324,8 @@ const Note = ({
{(replyingToUsers?.length && !isQuoting && renderReplyingTo()) || null}
{standalone && renderHelmet()}
{meta.torrentId && <Torrent torrentId={meta.torrentId} autopause={!standalone} />}
{text?.length > 0 && ( // TODO: remove whitespace-pre-wrap, replace \n with <br />
<div className={`whitespace-pre-wrap break-words py-2 ${emojiOnly && 'text-2xl'}`}>
{text?.length > 0 && (
<div className={`preformatted-wrap py-2 ${emojiOnly && 'text-2xl'}`}>
{text}
{translatedText && (
<p>