修复 新题比对.py 的一处bug

This commit is contained in:
weiye.wang 2024-02-09 08:17:34 +08:00
parent bbcc15fb03
commit 6cf28b3793
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ templatepath = ".\模板文件\讲义模板.txt"
pro_dict = load_dict("../题库0.3/problems.json") pro_dict = load_dict("../题库0.3/problems.json")
treated_dict = treat_dict(pro_dict) treated_dict = treat_dict(pro_dict)
data_raw = getCopy() 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]) data = "\n".join([item.strip() for item in problems_raw])
problems = [(d.strip()) for d in data.split("\\item") if not d.strip() == ""] 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" output = "使用说明:\\\\\n rep??????表示使用已有题号??????,\\\\\n s??????表示和??????相同,\\\\\n r??????表示和??????相关\n\n\\begin{enumerate}\n\n"