From 851f380eb10d23ffd08e8b845aed4039abbcd03b Mon Sep 17 00:00:00 2001 From: Parbez Date: Sun, 6 Mar 2022 20:57:29 +0530 Subject: [PATCH] fix(Util): escapeInlineCode properly (#7587) --- packages/discord.js/src/util/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/util/Util.js b/packages/discord.js/src/util/Util.js index 2ab39b468..744934052 100644 --- a/packages/discord.js/src/util/Util.js +++ b/packages/discord.js/src/util/Util.js @@ -189,7 +189,7 @@ class Util extends null { * @returns {string} */ static escapeInlineCode(text) { - return text.replace(/(?<=^|[^`])`(?=[^`]|$)/g, '\\`'); + return text.replaceAll('`', '\\`'); } /**