Skip to content

Commit

Permalink
fix(Util): escapeInlineCode properly (#7587)
Browse files Browse the repository at this point in the history
  • Loading branch information
imranbarbhuiya authored Mar 6, 2022
1 parent 10607db commit 851f380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/util/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class Util extends null {
* @returns {string}
*/
static escapeInlineCode(text) {
return text.replace(/(?<=^|[^`])`(?=[^`]|$)/g, '\\`');
return text.replaceAll('`', '\\`');
}

/**
Expand Down

0 comments on commit 851f380

Please sign in to comment.