summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/lib/utils/text_markdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/utils/text_markdown.js')
-rw-r--r--app/assets/javascripts/lib/utils/text_markdown.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/text_markdown.js b/app/assets/javascripts/lib/utils/text_markdown.js
index 6ff2af47dd8..0804d792631 100644
--- a/app/assets/javascripts/lib/utils/text_markdown.js
+++ b/app/assets/javascripts/lib/utils/text_markdown.js
@@ -232,7 +232,9 @@ export function insertMarkdownText({
.join('\n');
}
} else if (tag.indexOf(textPlaceholder) > -1) {
- textToInsert = tag.replace(textPlaceholder, () => selected.replace(/\\n/g, '\n'));
+ textToInsert = tag.replace(textPlaceholder, () =>
+ selected.replace(/\\n/g, '\n').replace('%br', '\\n'),
+ );
} else {
textToInsert = String(startChar) + tag + selected + (wrap ? tag : '');
}