mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 18:26:17 +03:00
fix: use global regex to escape backticks (#1253)
This commit is contained in:
parent
8d3be0f3cf
commit
08eebb651d
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ export function parseMastodonHTML(
|
||||||
const code = htmlToText(raw)
|
const code = htmlToText(raw)
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
.replace(/`/, '`')
|
.replace(/`/g, '`')
|
||||||
const classes = lang ? ` class="language-${lang}"` : ''
|
const classes = lang ? ` class="language-${lang}"` : ''
|
||||||
return `><pre><code${classes}>${code}</code></pre>`
|
return `><pre><code${classes}>${code}</code></pre>`
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue