From 1bfa644e012de8c26551d33b7d672f99031f8c41 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sun, 21 Jun 2026 11:36:08 +0300 Subject: Add module/function docs to run.rs --- src/run.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/run.rs b/src/run.rs index 183ce6b..50b076b 100644 --- a/src/run.rs +++ b/src/run.rs @@ -1,3 +1,9 @@ +//! Runtime orchestration for the `repo2markdown` binary. +//! +//! This module connects parsed CLI options with stdin path-list parsing and Markdown generation. +//! It reads a NUL-separated list of paths from input, then renders either plain Markdown or a +//! fenced Markdown document depending on the CLI configuration. + use std::io::{Read, Write}; use repo2markdown::{ @@ -7,6 +13,13 @@ use repo2markdown::{ use crate::cli::Cli; +/// Runs the main `repo2markdown` pipeline. +/// +/// The input stream is read as a NUL-separated path list. Empty path segments are ignored by the +/// path-list parser. Paths are resolved and rendered according to `cli` options. +/// +/// When `cli.fenced` is set, the full generated Markdown document is wrapped in an outer Markdown +/// fence. Otherwise, plain Markdown is written directly to `output`. pub fn run( cli: &Cli, mut input: R, -- cgit v1.3.1