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:
parent
7e95d53155
commit
769f30e135
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ export const TimelineNote: React.FC<TimelineNoteProps> = props => {
|
||||||
<CardContent className={classes.cardContent}>
|
<CardContent className={classes.cardContent}>
|
||||||
<Typography
|
<Typography
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: message.replace("\n", "<br />")
|
__html: message.replace(/\n/g, "<br />")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|
Loading…
Reference in a new issue