Skip to main content

build_walkthrough_markdown

Function build_walkthrough_markdown 

Source
pub fn build_walkthrough_markdown(
    guide: &StandardWalkthroughGuide,
    root: &Path,
    viewed: &[String],
) -> String
Expand description

Build a paste-into-PR markdown rendering of the existing walkthrough guide.

Mirrors the human terminal tour: a Focus line, Stage 1 (affects code outside the PR) and Stage 2 (self-contained) sections partitioned by concern_lens, with synthesized badges as inline code spans, then a collapsible Cleared panel. The JSON guide path is untouched; this is the only NEW walkthrough markdown surface. No ANSI.

viewed is the root-relative file list the local ledger marked viewed (the --mark-viewed state). Viewed files collapse out of their stage and into the Cleared panel, and the Cleared summary reports the viewed count, so the markdown surface honors --mark-viewed the same way the human surface does instead of silently ignoring it.