Pi66

Home | Repos | About | Blog | Gaza

merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi

About | Files | Commits | Refs | License


fix: remove markdown attributes after jinja tags

Author: pi66
Date: 2026-06-26 23:26
commit: 0bd73fa7

Stat

M src/build.py 4 +3 -1

Diff

diff --git a/src/build.py b/src/build.py
index c54fb77..49dec37 100644
--- a/src/build.py
+++ b/src/build.py
@@ -43,7 +43,9 @@ def html_filter(html_content:str):
         for fltr in replace_filters:
             line = line.replace(*fltr)
         html.append(line)
-    return("\n".join(html))
+    result = "\n".join(html)
+    result = re.sub(r'(}}\s*)\[[^\]]*\]', r'\1', result)
+    return result
 
 def jinja_handler(file, html_content, config=None):
     try:

// Created by Pi66

// Copyright ©Pi66 2026