Skip to content

Commit

Permalink
fix: use global regex to escape backticks (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
skryukov committed Jan 17, 2023
1 parent 8d3be0f commit 08eebb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composables/content-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function parseMastodonHTML(
const code = htmlToText(raw)
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/`/, '&#96;')
.replace(/`/g, '&#96;')
const classes = lang ? ` class="language-${lang}"` : ''
return `><pre><code${classes}>${code}</code></pre>`
})
Expand Down

0 comments on commit 08eebb6

Please sign in to comment.