Skip to content

Commit

Permalink
Preserve paragraphs in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sherman committed Sep 25, 2024
1 parent 63ef760 commit 963beeb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ async function LiveComment({
<TimeAgo createdAt={comment.createdAt} side="bottom" />
</Link>
</div>
<p>{comment.body}</p>
{comment.body
?.split("\n")
.map((line, index) => <p key={index}>{line}</p>)}

Check warning on line 125 in packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/comment.tsx

View workflow job for this annotation

GitHub Actions / lint

Do not use Array index in keys
</CommentClientWrapperWithToolbar>

{comment.children?.map((comment) => (
Expand Down

0 comments on commit 963beeb

Please sign in to comment.