From fa67eebb08ec9d71d94cdeaf757cc84f33053691 Mon Sep 17 00:00:00 2001 From: Janine vN Date: Sun, 11 Apr 2021 13:58:39 -0400 Subject: Remove unused codeblock regex With the regex sufficiently stolen from snekbox and confirmed to work, the original codeblock regex has been removed. --- bot/exts/internal_eval/_internal_eval.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'bot') diff --git a/bot/exts/internal_eval/_internal_eval.py b/bot/exts/internal_eval/_internal_eval.py index 198c1312..4746c6c9 100644 --- a/bot/exts/internal_eval/_internal_eval.py +++ b/bot/exts/internal_eval/_internal_eval.py @@ -15,8 +15,6 @@ __all__ = ["InternalEval"] log = logging.getLogger(__name__) -CODEBLOCK_REGEX = re.compile(r"(^```(py(thon)?)?\n)|(```$)") - FORMATTED_CODE_REGEX = re.compile( r"(?P(?P```)|``?)" # code delimiter: 1-3 backticks; (?P=block) only matches if it's a block r"(?(block)(?:(?P[a-z]+)\n)?)" # if we're in a block, match optional language (only letters plus newline) -- cgit v1.2.3