From a0ca0dfce0a55c4ae8887cb26983024c6975d08b Mon Sep 17 00:00:00 2001 From: bsian03 Date: Tue, 26 Jan 2021 00:12:41 +0000 Subject: [PATCH] Use non capturing group --- src/Utility/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utility/Utils.js b/src/Utility/Utils.js index bd30cea4..e6709518 100644 --- a/src/Utility/Utils.js +++ b/src/Utility/Utils.js @@ -163,7 +163,7 @@ class Utils { * @memberof Utils */ splitMessage(content, length) { - return content.match(typeof length === 'number' && length > 0 ? new RegExp(`[\\s\\S]{1,${length}}([\\n\\r]|$)`, 'g') : this.stringSplit); + return content.match(typeof length === 'number' && length > 0 ? new RegExp(`[\\s\\S]{1,${length}}(?:[\\n\\r]|$)`, 'g') : this.stringSplit); } /**