Bläddra i källkod

处理MD内容中的所有图片引用

zhch158_admin 1 månad sedan
förälder
incheckning
d2b84c7836
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      ocr_validator_utils.py

+ 3 - 0
ocr_validator_utils.py

@@ -674,6 +674,9 @@ def load_ocr_data_file(json_path: str, config: Dict) -> Tuple[List, str, str]:
     if md_file.exists():
         with open(md_file, 'r', encoding='utf-8') as f:
             md_content = f.read()
+        
+        # ✅ 关键修改:处理MD内容中的所有图片引用
+        md_content = process_all_images_in_content(md_content, str(json_file))
     
     # 查找对应的图片文件
     image_path = find_corresponding_image(json_file, config)