Skip to content

Commit beee89c

Browse files
authored
Merge branch 'dev' into feature/#754-create-scribble-paragraph-under-low-mock
2 parents 428b891 + 7b7d6b7 commit beee89c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/components/mock-components/front-text-components/rich-text/rich-text.utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const parseTextWithFormatting = (text: string): string => {
22
// Apply <br>
3-
let parsedText = text.replace(/(?:\\n|<br>)/g, '<br>');
3+
// Replaces line breaks (`\r\n`, `\r`, `\n`, `\\n`, or `<br>`) with `<br>` tags.
4+
let parsedText = text.replace(/(\r\n|\r|\n|\\n|<br>)/g, '<br>');
45

56
// Replace *text* <strong>text</strong>
67
parsedText = parsedText.replace(/\*(.*?)\*/g, '<strong>$1</strong>');

0 commit comments

Comments
 (0)