diff options
| author | A Farzat <a@farzat.xyz> | 2026-06-20 09:10:18 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2026-06-20 10:51:40 +0300 |
| commit | 1fe05c6389e8e9a69cc7126dc967b79d5f75f432 (patch) | |
| tree | 991da542ff3cfce4132ca1752a35b64cd669aed7 /src/fenced_md_generator.rs | |
| parent | a658ae86ace40a00a8476a19f55aca3fe72abd8a (diff) | |
| download | repo2markdown-1fe05c6389e8e9a69cc7126dc967b79d5f75f432.tar.gz repo2markdown-1fe05c6389e8e9a69cc7126dc967b79d5f75f432.zip | |
Add markdown generator module/function docs
Diffstat (limited to 'src/fenced_md_generator.rs')
| -rw-r--r-- | src/fenced_md_generator.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fenced_md_generator.rs b/src/fenced_md_generator.rs index 41ca8cc..7cc5e37 100644 --- a/src/fenced_md_generator.rs +++ b/src/fenced_md_generator.rs @@ -1,3 +1,8 @@ +//! Generate Markdown and wrap the entire result in an outer Markdown fence. +//! +//! This module is useful when the generated project Markdown needs to be embedded inside another +//! document or a prompt. + use std::{ io::{Read, Write}, path::Path, @@ -8,6 +13,13 @@ use crate::{ util::fence::generate_outer_backticks, }; +/// Generates Markdown from a null-separated path list and wraps the full output in a fence. +/// +/// The inner Markdown is produced by [`generate_markdown_from_paths`]. The outer fence length is +/// chosen so that any backtick runs inside the generated Markdown cannot close the outer fence. +/// +/// `render_options` controls file-size limits and placeholder behavior. `root` controls displayed +/// relative paths, while `origin_base` controls how relative input paths are resolved. pub fn generate_fenced_markdown<R: Read, W: Write>( input: R, mut output: W, |
