diff --git a/dsLightRag/ShiTi/T3_DocxToMd.py b/dsLightRag/ShiTi/T3_DocxToMd.py index 96250e19..68356952 100644 --- a/dsLightRag/ShiTi/T3_DocxToMd.py +++ b/dsLightRag/ShiTi/T3_DocxToMd.py @@ -91,13 +91,18 @@ async def main(): # 分割试题内容 questions = [] current_question = "" + found_first_question = False for line in content.split('\n'): if any(line.startswith(f"【题型】 {t}") for t in question_types): - if current_question: - questions.append(current_question.strip()) - current_question = line + "\n" - else: + if not found_first_question: + found_first_question = True + current_question = "**" + line + "**\n" # 加粗处理 + else: + if current_question: + questions.append(current_question.strip()) + current_question = "**" + line + "**\n" # 加粗处理 + elif found_first_question: current_question += line + "\n" if current_question: diff --git a/dsLightRag/output/《动能定理》巩固练习/auto/《动能定理》巩固练习_origin.pdf b/dsLightRag/output/《动能定理》巩固练习/auto/《动能定理》巩固练习_origin.pdf index 462905f7..1c8cd746 100644 Binary files a/dsLightRag/output/《动能定理》巩固练习/auto/《动能定理》巩固练习_origin.pdf and b/dsLightRag/output/《动能定理》巩固练习/auto/《动能定理》巩固练习_origin.pdf differ