10 Commits

Author SHA1 Message Date
Manuel Rüger
17436efd17 renderer: HTML-escape admonition title and guard against empty attachments
mkDocsAdmonition: escape the admonition title with html.EscapeString
before inserting it into the Confluence storage format XML. An unescaped
title containing '<', '>', '&', or '"' would break the XML structure.

image: add a len(attachments)==0 guard before accessing attachments[0]
in the local-attachment code path. ResolveLocalAttachments always returns
either an error or the requested attachments, so this is currently
unreachable, but the explicit check prevents a future silent panic if the
function's behaviour changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-16 19:18:29 +01:00
Johan Fagerberg
ab2c456851 chore: fix comment referring to wrong class 2026-03-11 12:49:22 +01:00
Johan Fagerberg
6f18a47ed0 feat: don't add redundant 'height' to images 2026-03-11 12:49:22 +01:00
Johan Fagerberg
a0e9594f50 chore: clean up over-explanations slightly 2026-03-11 12:49:22 +01:00
Johan Fagerberg
9c58c36b46 feat: use 'center' for image widths 760<x<1800 2026-03-11 12:49:22 +01:00
Johan Fagerberg
cbc7400f92 feat: align image rendering with Confluence default 2026-03-11 12:49:22 +01:00
Johan Fagerberg
4d887bde74 feat: add support for image dimensions 2026-03-11 12:49:22 +01:00
Johan Fagerberg
c32cd79dc8 feat: add support for '--image-align' 2026-03-11 12:49:22 +01:00
Manuel Rüger
e7a3877ded Bump goldmark to 1.7.8 2024-10-21 14:39:40 +02:00
Manuel Rüger
dc8842106b *: Reorganize code 2024-09-29 00:13:04 +02:00