Refactor PDF content rendering: improve list indentation logic, add numbered code block rendering with gutter, and update text wrapping alignment.

This commit is contained in:
Sebastian Unterschütz
2026-05-12 19:23:44 +02:00
parent 81745b5f48
commit 436cdcc516
6 changed files with 95 additions and 21 deletions
+2 -2
View File
@@ -119,8 +119,8 @@ func RenderAST(doc ast.Node, content []byte, r *IHKRenderer) error {
}
// Fall through: render as plain code block on error
}
// Render non-diagram code blocks as monospace paragraphs
r.RenderParagraphSpans([]InlineSpan{{Text: code, Code: true}})
// Render as a numbered code block (gutter + monospace body).
r.RenderCodeBlock(lang, code)
return ast.WalkSkipChildren, nil
// ── Images ────────────────────────────────────────────────────────────