This commit is contained in:
HibiKier 2023-04-05 22:57:14 +08:00
parent 6eebb8229f
commit b6e3af45e9

View File

@ -184,7 +184,8 @@ async def _(
problem_image: Message = Arg("problem_image"),
):
try:
if word_type == "正则":
if word_type == "正则" and problem:
problem = unescape(problem)
try:
re.compile(problem)
except re.error: