From 7a3a47923b59730c001b53ccfa1ac69f45ef0bdd Mon Sep 17 00:00:00 2001
From: sergio
Date: Tue, 20 Jan 2026 12:01:05 +0100
Subject: [PATCH] adjust
---
apply_content.py | 10 ++++----
thesis_output/plantilla_individual.htm | 34 +++++++++++++-------------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/apply_content.py b/apply_content.py
index 0e23226..5a58a5c 100644
--- a/apply_content.py
+++ b/apply_content.py
@@ -121,13 +121,13 @@ def parse_md_to_html_blocks(md_content):
mermaid_lines.append(lines[i])
i += 1
- # Try to extract title from mermaid content (YAML format: title: "...")
+ # Try to extract title from mermaid content (YAML format)
mermaid_content = '\n'.join(mermaid_lines)
- # Match YAML format: title: "Title" or title: 'Title'
+ # Match title with quotes: title: "Something" or title: 'Something'
title_match = re.search(r'title:\s*["\']([^"\']+)["\']', mermaid_content)
if not title_match:
- # Fallback to non-YAML format: title "Title"
- title_match = re.search(r'title\s+["\']?([^"\'"\n]+)["\']?', mermaid_content)
+ # Match title without quotes: title: Something
+ title_match = re.search(r'title:\s*([^"\'\n]+)', mermaid_content)
if title_match:
fig_title = title_match.group(1).strip()
else:
@@ -145,7 +145,7 @@ def parse_md_to_html_blocks(md_content):
if os.path.exists(fig_path):
# Use Word-compatible width in cm (A4 text area is ~16cm wide, use ~12cm max)
- html_blocks.append(f'''
''')
+ html_blocks.append(f'''
''')
else:
# Fallback to placeholder
html_blocks.append(f'''[Insertar diagrama Mermaid aquí]
''')
diff --git a/thesis_output/plantilla_individual.htm b/thesis_output/plantilla_individual.htm
index 1355429..0aeb5c7 100644
--- a/thesis_output/plantilla_individual.htm
+++ b/thesis_output/plantilla_individual.htm
@@ -4636,8 +4636,8 @@ _Toc14106979">Connectionist Temporal Classification (CTC): La función de pérdida CTC (Graves et al., 2006) permite entrenar modelos de reconocimiento de secuencias sin necesidad de alineamiento carácter por carácter, simplificando enormemente el proceso de entrenamiento.