fix babycode code block generation

This commit is contained in:
2025-08-04 03:29:56 +03:00
parent d36e94127e
commit d3f63c4120

View File

@ -8,7 +8,7 @@ def tag_code(children, attr):
return f"<code class=\"inline-code\">{children}</code>" return f"<code class=\"inline-code\">{children}</code>"
else: else:
t = children.strip() t = children.strip()
button = f"<button type=button class=\"copy-code\" value={t}>Copy</button>" button = f"<button type=button class=\"copy-code\" value=\"{t}\">Copy</button>"
return f"<pre><span class=\"copy-code-container\">{button}</span><code>{t}</code></pre>" return f"<pre><span class=\"copy-code-container\">{button}</span><code>{t}</code></pre>"
def tag_list(children): def tag_list(children):