From 6d4d87f181d086445b7b5fc04469db3e1a5cbe53 Mon Sep 17 00:00:00 2001 From: Lukas Krupcik <lukas.krupcik@vsb.cz> Date: Mon, 3 Mar 2025 11:30:10 +0100 Subject: [PATCH] modified: scripts/maketitle.py --- scripts/maketitle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/maketitle.py b/scripts/maketitle.py index d3f6dc20..562642d1 100644 --- a/scripts/maketitle.py +++ b/scripts/maketitle.py @@ -41,7 +41,7 @@ def process_md_file(md_path): if match: title = match.group(1).strip() frontmatter = f'---\ntitle: "{title}"\n---\n' - + # Construct new content with frontmatter at beginning before_h1 = content[:match.start()].lstrip('\n') after_h1 = content[match.end():].lstrip('\n') @@ -63,7 +63,7 @@ def process_md_file(md_path): mdx_path = md_path.with_suffix('.mdx') with open(mdx_path, 'w', encoding='utf-8') as file_handle: file_handle.write(new_content) - + # Remove original MD file md_path.unlink() print(f"Converted {md_path} to {mdx_path}") -- GitLab