Skip to content

Commit

Permalink
[FIX] Announcements with multiple lines fixed. (#20381)
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal authored Feb 8, 2021
1 parent 4e93da4 commit f0073e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/views/room/Announcement/Announcement.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default ({ announcement, announcementDetails }) => {

announcementDetails ? announcementDetails() : setModal(<AnnouncementModal onClose={closeModal}>{announcement}</AnnouncementModal>);
};
const announcementWithoutBreaks = announcement && announcement.replace(/(\r\n|\n|\r)/gm, ' ');

return announcement ? <Announcement onClickOpen={handleClick}><MarkdownText content={announcement} /></Announcement> : false;
return announcementWithoutBreaks ? <Announcement onClickOpen={handleClick}><MarkdownText content={announcementWithoutBreaks} /></Announcement> : false;
};

0 comments on commit f0073e7

Please sign in to comment.