mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 10:14:04 +00:00
fix(StatusChatInput): exclude markdown indicators from formatting
Closes #1928
This commit is contained in:
parent
fe0e5de8ef
commit
6603f025c3
@ -100,10 +100,10 @@ Rectangle {
|
|||||||
|
|
||||||
function parseMarkdown(markdownText) {
|
function parseMarkdown(markdownText) {
|
||||||
const htmlText = markdownText
|
const htmlText = markdownText
|
||||||
.replace(/\~\~([^*]+)\~\~/gim, '<span style="text-decoration: line-through">~~$1~~</span>')
|
.replace(/\~\~([^*]+)\~\~/gim, '~~<span style="text-decoration: line-through">$1</span>~~')
|
||||||
.replace(/\*\*([^*]+)\*\*/gim, '<b>:asterisk::asterisk:$1:asterisk::asterisk:</b>')
|
.replace(/\*\*([^*]+)\*\*/gim, ':asterisk::asterisk:<b>$1</b>:asterisk::asterisk:')
|
||||||
.replace(/\`([^*]+)\`/gim, '<code>`$1`</code>')
|
.replace(/\`([^*]+)\`/gim, '`<code>$1</code>`')
|
||||||
.replace(/\*([^*]+)\*/gim, '<i>:asterisk:$1:asterisk:</i>')
|
.replace(/\*([^*]+)\*/gim, ':asterisk:<i>$1</i>:asterisk:')
|
||||||
return htmlText.replace(/\:asterisk\:/gim, "*")
|
return htmlText.replace(/\:asterisk\:/gim, "*")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user