From 6cf28b3793f976cb2e01f36882b9015d89f54866 Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Fri, 9 Feb 2024 08:17:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=96=B0=E9=A2=98?= =?UTF-8?q?=E6=AF=94=E5=AF=B9.py=20=E7=9A=84=E4=B8=80=E5=A4=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/新题比对.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/工具v2/新题比对.py b/工具v2/新题比对.py index 8f0229e7..2e5cf2d2 100644 --- a/工具v2/新题比对.py +++ b/工具v2/新题比对.py @@ -9,7 +9,7 @@ templatepath = ".\模板文件\讲义模板.txt" pro_dict = load_dict("../题库0.3/problems.json") treated_dict = treat_dict(pro_dict) data_raw = getCopy() -problems_raw = re.findall(r"\\begin\{enumerate\}([\s\S]*)\\end\{enumerate\}",data_raw) +problems_raw = re.findall(r"\\begin\{enumerate\}([\s\S]*?)\\end\{enumerate\}",data_raw) data = "\n".join([item.strip() for item in problems_raw]) problems = [(d.strip()) for d in data.split("\\item") if not d.strip() == ""] output = "使用说明:\\\\\n rep??????表示使用已有题号??????,\\\\\n s??????表示和??????相同,\\\\\n r??????表示和??????相关\n\n\\begin{enumerate}\n\n"