From ccb2d7852b3150571f5b635027b90e0ef537da2d Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 22 Feb 2023 09:11:54 +0100 Subject: [PATCH] Update Translator.plugin.js --- Plugins/Translator/Translator.plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Translator/Translator.plugin.js b/Plugins/Translator/Translator.plugin.js index 49c557bc5d..13ff9dda55 100644 --- a/Plugins/Translator/Translator.plugin.js +++ b/Plugins/Translator/Translator.plugin.js @@ -2,7 +2,7 @@ * @name Translator * @author DevilBro * @authorId 278543574059057154 - * @version 2.5.1 + * @version 2.5.2 * @description Allows you to translate Messages and your outgoing Messages within Discord * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -1315,7 +1315,7 @@ module.exports = (_ => { addExceptions (string, excepts) { for (let count in excepts) { let exception = BDFDB.ArrayUtils.is(this.settings.exceptions.wordStart) && this.settings.exceptions.wordStart.some(n => excepts[count].indexOf(n) == 0) ? excepts[count].slice(1) : excepts[count]; - let newString = string.replace(new RegExp(BDFDB.StringUtils.regEscape(`{{${count}}}`)), exception); + let newString = string.replace(new RegExp(BDFDB.StringUtils.regEscape(`{\s*{\s*${count}\s*}\s*}`)), exception); if (newString == string) string = newString + " " + exception; else string = newString; }