Pi66

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

← back to log

fix: remove markdown attributes after jinja tags

author: pi66
date: 2026-06-26 23:26
hash: 0bd73fa73e9a8b20f0e9359e3c2fa4bd71e739d0

Diffstat:

M

src/build.py
4 ++++++++++++++++++++++--------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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: