From ade6ba02997a6428c7046da65ba3ff96b86871b3 Mon Sep 17 00:00:00 2001 From: tipakA <31581159+tipakA@users.noreply.github.com> Date: Fri, 26 Jul 2019 15:49:49 +0200 Subject: [PATCH] Fix regex handling one-line codeblocks (#10) --- src/listeners/messageInvalid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listeners/messageInvalid.js b/src/listeners/messageInvalid.js index 22c991c..385a91b 100644 --- a/src/listeners/messageInvalid.js +++ b/src/listeners/messageInvalid.js @@ -59,7 +59,7 @@ class MessageInvalidListener extends Listener { return null; } - const regex = /^\s*(`{1,3})(.+?)\n([^]+)\1\s*$/; + const regex = /^\s*(`{1,3})(.+?)[ \n]([^]+)\1\s*$/; const match = message.content.slice(prefix.length).match(regex); if (!match) { return null;