From: Tim Düsterhus Date: Wed, 17 Nov 2021 08:28:10 +0000 (+0100) Subject: Migrate the codebox macro to the native title feature for code blocks X-Git-Tag: 5.6.final~115 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afe461149adeb1bb12ce9ba45edc008dc4aaf373;p=GitHub%2FWoltLab%2Fwoltlab.github.io.git Migrate the codebox macro to the native title feature for code blocks --- 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: