Use regex instead of string to replace all "\n" occurences (#736)

* Use regex instead of string to replace all

* Add global flag to regex to replace all occurences

Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
This commit is contained in:
Dominik Żegleń 2020-10-02 11:05:52 +02:00 committed by GitHub
parent 7e95d53155
commit 769f30e135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ export const TimelineNote: React.FC<TimelineNoteProps> = props => {
<CardContent className={classes.cardContent}>
<Typography
dangerouslySetInnerHTML={{
__html: message.replace("\n", "<br />")
__html: message.replace(/\n/g, "<br />")
}}
/>
</CardContent>