From 10f44bb42295276aa56a533bb5680fdfa5b73851 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Mon, 18 Dec 2023 13:02:01 +0800 Subject: [PATCH] =?UTF-8?q?database=5Ftools=E4=B8=AD=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=AE=B2=E4=B9=89=E9=87=8C=E8=AE=B2=E4=B9=89=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AAsection=E6=97=B6=E4=B8=8D=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"