diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index d447447a..15684024 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1273,7 +1273,8 @@ def GenerateSingleLessonNote(id,notesdict,metadict,templatepath,outputfilepath,c paragraphs = [p for p in rawoutput.split("\\section") if not p.strip() == ""] for item in paragraphs: sectionkey, content = re.findall(r"\{([\S]*)\}\n([\S\s]*)$",item)[0] - output += "\\section{" + structure[sectionkey]["name"] + "}\n\n" + if not len(paragraphs) == 1: + output += "\\section{" + structure[sectionkey]["name"] + "}\n\n" if not structure[sectionkey]["spaceflag"] or answered: content = re.sub(r"\\vspace[\*]?\{[\S]*\}","\n",content) output += content + "\n\n"