feat: don't add redundant 'height' to images

This commit is contained in:
Johan Fagerberg
2026-02-25 21:50:56 +01:00
committed by Manuel Rüger
parent ec6a718c76
commit 6f18a47ed0
2 changed files with 7 additions and 7 deletions

View File

@@ -139,11 +139,11 @@ func (r *ConfluenceFencedCodeBlockRenderer) renderFencedCodeBlock(writer util.Bu
return ast.WalkStop, err
}
r.Attachments.Attach(attachment)
effectiveAlign := calculateAlign(r.MarkConfig.ImageAlign, attachment.Width)
effectiveLayout := calculateLayout(effectiveAlign, attachment.Width)
displayWidth := calculateDisplayWidth(attachment.Width, effectiveLayout)
err = r.Stdlib.Templates.ExecuteTemplate(
writer,
"ac:image",
@@ -164,7 +164,7 @@ func (r *ConfluenceFencedCodeBlockRenderer) renderFencedCodeBlock(writer util.Bu
attachment.Width,
attachment.Height,
displayWidth,
attachment.Height,
"",
attachment.Name,
"",
attachment.Filename,
@@ -183,11 +183,11 @@ func (r *ConfluenceFencedCodeBlockRenderer) renderFencedCodeBlock(writer util.Bu
return ast.WalkStop, err
}
r.Attachments.Attach(attachment)
effectiveAlign := calculateAlign(r.MarkConfig.ImageAlign, attachment.Width)
effectiveLayout := calculateLayout(effectiveAlign, attachment.Width)
displayWidth := calculateDisplayWidth(attachment.Width, effectiveLayout)
err = r.Stdlib.Templates.ExecuteTemplate(
writer,
"ac:image",
@@ -208,7 +208,7 @@ func (r *ConfluenceFencedCodeBlockRenderer) renderFencedCodeBlock(writer util.Bu
attachment.Width,
attachment.Height,
displayWidth,
attachment.Height,
"",
attachment.Name,
"",
attachment.Filename,