fix: plain text user bubbles and remove trailing empty paragraph gap
Made-with: Cursor
This commit is contained in:
parent
ac033c1b21
commit
c5f392e1fd
@ -777,9 +777,7 @@ export const ChatMessage = memo(function ChatMessage({ message, isStreaming, onS
|
||||
const attachmentInfo = parseAttachments(textContent);
|
||||
const richHtml = userHtmlMap?.get(message.id) ?? userHtmlMap?.get(textContent) ?? userHtmlMap?.get(attachmentInfo?.message ?? "");
|
||||
|
||||
const bubbleContent = richHtml
|
||||
? <div className="chat-user-html-content" dangerouslySetInnerHTML={{ __html: richHtml }} />
|
||||
: <p className="whitespace-pre-wrap break-words">{attachmentInfo?.message ?? textContent}</p>;
|
||||
const bubbleContent = <p className="whitespace-pre-wrap wrap-break-word m-0">{attachmentInfo?.message ?? textContent}</p>;
|
||||
|
||||
if (attachmentInfo) {
|
||||
return (
|
||||
|
||||
@ -224,6 +224,9 @@ body {
|
||||
.chat-user-html-content p:empty {
|
||||
min-height: 1em;
|
||||
}
|
||||
.chat-user-html-content p:empty:last-child {
|
||||
display: none;
|
||||
}
|
||||
.chat-user-html-content strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user