Markdown Report Renderer
A ReportVisitor that renders a ReportNode tree to GitHub-flavoured Markdown.
Delegates all statistical table formatting to StatisticReporter (reusing the existing half-width and summary report methods). Uses MarkDown.Table for ReportNode.DataTable and ReportNode.WeightedStatTable nodes.
Section depth tracking: ReportNode.Section nodes increment an internal depth counter on enter and decrement on exit. Heading levels are promoted automatically:
Document title →
#Depth 1 sections →
##Depth 2 sections →
###Depth 3+ sections →
####(capped at######)
Node rendering:
ReportNode.Document —
# title+ blank lineReportNode.Section —
## title(depth-promoted)ReportNode.Heading —
#× level + textReportNode.Paragraph — text + blank line
ReportNode.StatTable —
StatisticReporter.halfWidthSummaryReportAsMarkDown(detail=false); extended table appended for detail=trueReportNode.WeightedStatTable — MarkDown.Table (two-column key/value)
ReportNode.DataTable — MarkDown.Table with LEFT alignment
ReportNode.PlotNode — saves PNG to RenderContext.plotDir; emits
ReportNode.RawText — fenced code block (
```)ReportNode.PageBreak —
---
All mutable state uses the my prefix per KSL coding conventions.
@param ctx the render context supplying output paths and formatting preferences
Functions
Writes the accumulated report to the given PrintWriter.