修改GenerateProblemListFromString2024中parse内容的一处bug

This commit is contained in:
wangweiye7840 2024-01-25 12:15:25 +08:00
parent 954f98951c
commit 4ef00aa28a
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ def GenerateProblemListFromString2024(data): #从来自.tex文件的字符串生
content = re.sub(r"^\[rep(\d+)\]","",content_raw).strip()
meta = {"rep":re.findall(r"\[rep(\d+)\]",content_raw)[0].zfill(6)}
else: # 方括号不以rep开始, 用s,r,u分别表示相同, 相关, 无关, 返回有这三个字段的字典
content = re.sub(r"^\[.*\]","",content_raw).strip()
content = re.sub(r"^\[.*?\]","",content_raw).strip()
metaraw = re.findall(r"^\[(.*?)\]",content_raw)[0]
sameidraw = re.findall(r"s([\d,:]*)",metaraw)
if not sameidraw == []: