mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
fix: preserve newlines/paragraph breaks in rendered comments
Comment content was stored with newlines intact but rendered inside <p> elements with default white-space, collapsing line breaks into single spaces. Add whitespace-pre-wrap (and break-words) to the comment/reply render wrappers in the comments pane and the compare-versions view.
This commit is contained in:
+1
-1
@@ -822,7 +822,7 @@ export default function CompareVersionsPageClient({
|
||||
</button>
|
||||
</div>
|
||||
{comment.content && (
|
||||
<p className="text-muted-foreground leading-relaxed">
|
||||
<p className="text-muted-foreground leading-relaxed whitespace-pre-wrap break-words">
|
||||
{comment.content}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -587,7 +587,7 @@ export const CommentsPane = memo(function CommentsPane({
|
||||
) : (
|
||||
<div className="mb-2">
|
||||
{comment.content && (
|
||||
<p className="text-sm mb-2">
|
||||
<p className="text-sm mb-2 whitespace-pre-wrap break-words">
|
||||
<CommentRichText
|
||||
text={comment.content}
|
||||
onAssetMentionClick={onAssetMentionClick}
|
||||
@@ -793,7 +793,7 @@ export const CommentsPane = memo(function CommentsPane({
|
||||
) : (
|
||||
<div className="mb-1">
|
||||
{reply.content && (
|
||||
<p className="text-sm">
|
||||
<p className="text-sm whitespace-pre-wrap break-words">
|
||||
<CommentRichText
|
||||
text={reply.content}
|
||||
onAssetMentionClick={onAssetMentionClick}
|
||||
|
||||
Reference in New Issue
Block a user