From afe461149adeb1bb12ce9ba45edc008dc4aaf373 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 17 Nov 2021 09:28:10 +0100 Subject: [PATCH] Migrate the codebox macro to the native title feature for code blocks --- main.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/main.py b/main.py index 8e816f7d..0bc8a53a 100644 --- a/main.py +++ b/main.py @@ -18,24 +18,15 @@ def define_env(env): ).replace('

', '').replace('

', '') return f""" -
-
- {title} - {icon} -
- ```{language} - --8<-- "{filepath}" - ``` -
+```{language} title='{title} {icon}' +--8<-- "{filepath}" +``` """ else: return f""" -
-
{title}
-```{language} +```{language} title="{title}" {contents} ``` -
""" else: if filepath is not None: -- 2.20.1