Update generation

This commit is contained in:
2025-12-16 00:31:27 +01:00
parent 3b0f30d79b
commit 6608032f0c
13 changed files with 31 additions and 17 deletions

View File

@@ -35,9 +35,11 @@ def extract_mermaid_diagrams():
matches = re.findall(pattern, content, re.DOTALL)
for i, mermaid_code in enumerate(matches):
# Try to extract title
title_match = re.search(r'title\s+["\']?([^"\'"\n]+)["\']?', mermaid_code)
title = title_match.group(1).strip() if title_match else f"Diagrama de {md_file}"
# Try to extract title from YAML front matter or inline title
title_match = re.search(r'title:\s*["\']([^"\']+)["\']', mermaid_code)
if not title_match:
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({
'source': md_file,