Skip to content

feat: Add caption parameter to Report.code and simplify callers#20

Merged
SilverRainZ merged 1 commit into
masterfrom
feat/report-caption
Jun 1, 2026
Merged

feat: Add caption parameter to Report.code and simplify callers#20
SilverRainZ merged 1 commit into
masterfrom
feat/report-caption

Conversation

@SilverRainZ
Copy link
Copy Markdown
Member

Summary

  • Add optional caption parameter to Report.code(), Report.exception(), and Report.traceback()
  • When caption is provided, the literal block is wrapped in a <container> with literal-block-wrapper class and a <caption> child node, similar to .. code-block::'s :caption: option
  • Refactor all report.text(...) + report.code(...) and report.text(...) + report.exception(...) pairs in ctxnodes.py and jinja.py to use the new caption parameter directly

Closes # (if applicable)

Add an optional caption parameter to Report.code(), exception(), and
traceback() methods. When provided, the code block is wrapped in a
container node with literal-block-wrapper class and a caption child,
similar to .. code-block::'s :caption: option.

Refactor all report.text() + report.code() and report.text() +
report.exception() pairs in ctxnodes.py and jinja.py to use the new
caption parameter directly.

Co-authored-by: DeepSeek <service@deepseek.com>
@SilverRainZ SilverRainZ force-pushed the feat/report-caption branch from cbc3dd7 to 85cff62 Compare May 31, 2026 02:32
@SilverRainZ SilverRainZ merged commit ebbe2f9 into master Jun 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant