topmark.presentation.markdown.diagnostic¶
topmark / presentation / markdown / diagnostic
Markdown diagnostic rendering helpers for CLI-shared emitters.
This module contains Click-free helpers that render diagnostics as Markdown for
human-facing output (OutputFormat.MARKDOWN). Markdown output is
document-oriented and intentionally ignores TEXT-only verbosity controls.
These helpers are intentionally kept independent from machine-readable formats.
render_human_diagnostics_markdown ¶
Render human diagnostics as Markdown from prepared data.
Markdown output is document-oriented and intentionally ignores TEXT-only verbosity controls.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
Section heading. |
required |
counts
|
HumanDiagnosticCounts
|
Aggregated human-facing diagnostic counts. |
required |
diagnostics
|
list[HumanDiagnosticLine]
|
Prepared human-facing diagnostic lines. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Markdown fragment string (may be empty). Includes a trailing newline when non-empty. |
Source code in src/topmark/presentation/markdown/diagnostic.py
render_diagnostics_markdown ¶
Render diagnostics as a Markdown fragment for human output.
Behavior
- If there are no diagnostics, return an empty string.
- Render a stable Markdown triage summary and one bullet per diagnostic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diagnostics
|
FrozenDiagnosticLog | MutableDiagnosticLog
|
An immutable or mutable diagnostic log. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Markdown fragment string (may be empty). Includes a trailing newline when non-empty. |