Skip to content

Commit

Permalink
show new line in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev committed Jan 15, 2025
1 parent 2fc9e33 commit 3942232
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Resource/ResourceCommentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export default CommentSection;
export const Comment = ({ comment, created_by }: CommentModel) => (
<div className="mt-4 flex w-full flex-col rounded-lg border border-secondary-300 bg-white p-4 text-secondary-800">
<div className="w-full">
<p className="break-words">{comment}</p>
<p className="break-words whitespace-pre-wrap">
{comment.replace(/\n+/g, "\n")}
</p>
</div>
<div className="mr-auto flex items-center rounded-md border bg-secondary-100 py-1 pl-2 pr-3">
<Avatar
Expand Down

0 comments on commit 3942232

Please sign in to comment.