headers
Some checks failed
build_docker / build_cpu (pull_request) Successful in 5m16s
build_docker / build_easyocr_gpu (pull_request) Has been cancelled
build_docker / build_doctr (pull_request) Has been cancelled
build_docker / build_doctr_gpu (pull_request) Has been cancelled
build_docker / build_raytune (pull_request) Has been cancelled
build_docker / build_gpu (pull_request) Has been cancelled
build_docker / build_easyocr (pull_request) Has been cancelled
build_docker / essential (pull_request) Successful in 1s

This commit is contained in:
2026-01-20 11:49:51 +01:00
parent e57454050e
commit f5d1032e41
5 changed files with 91 additions and 84 deletions

View File

@@ -35,10 +35,12 @@ def extract_mermaid_diagrams():
matches = re.findall(pattern, content, re.DOTALL)
for i, mermaid_code in enumerate(matches):
# Try to extract title from YAML front matter or inline title
# Try to extract title from YAML front matter
# Match title with quotes: title: "Something" or title: 'Something'
title_match = re.search(r'title:\s*["\']([^"\']+)["\']', mermaid_code)
if not title_match:
title_match = re.search(r'title\s+["\']?([^"\'"\n]+)["\']?', mermaid_code)
# Match title without quotes: title: Something
title_match = re.search(r'title:\s*([^"\'\n]+)', mermaid_code)
title = title_match.group(1).strip() if title_match else f"Diagrama {len(diagrams) + 1}"
diagrams.append({