From 6603f025c3df611e89f55c4f121e02013661d3d2 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Wed, 3 Mar 2021 14:15:22 +0100 Subject: [PATCH] fix(StatusChatInput): exclude markdown indicators from formatting Closes #1928 --- ui/shared/status/StatusChatInput.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/shared/status/StatusChatInput.qml b/ui/shared/status/StatusChatInput.qml index 151c4f92eb..72caad26f7 100644 --- a/ui/shared/status/StatusChatInput.qml +++ b/ui/shared/status/StatusChatInput.qml @@ -100,10 +100,10 @@ Rectangle { function parseMarkdown(markdownText) { const htmlText = markdownText - .replace(/\~\~([^*]+)\~\~/gim, '~~$1~~') - .replace(/\*\*([^*]+)\*\*/gim, ':asterisk::asterisk:$1:asterisk::asterisk:') - .replace(/\`([^*]+)\`/gim, '`$1`') - .replace(/\*([^*]+)\*/gim, ':asterisk:$1:asterisk:') + .replace(/\~\~([^*]+)\~\~/gim, '~~$1~~') + .replace(/\*\*([^*]+)\*\*/gim, ':asterisk::asterisk:$1:asterisk::asterisk:') + .replace(/\`([^*]+)\`/gim, '`$1`') + .replace(/\*([^*]+)\*/gim, ':asterisk:$1:asterisk:') return htmlText.replace(/\:asterisk\:/gim, "*") }