From 0b679b0b5d81ad8c5f61031ffe56b3f646ba9234 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sat, 20 Jun 2026 13:53:38 +0300 Subject: Add module/function docs to path_display --- src/util/path_display.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/util/path_display.rs b/src/util/path_display.rs index e9dca4b..d7bd624 100644 --- a/src/util/path_display.rs +++ b/src/util/path_display.rs @@ -1,5 +1,12 @@ +//! Path display helpers. + use std::path::Path; +/// Converts a path to a Markdown-friendly display string. +/// +/// This uses Rust's debug path formatting, then strips surrounding quotes when present. That keeps +/// escaped characters such as newlines and invalid UTF-8 markers visible in generated Markdown +/// headings. pub fn display_path(path: &Path) -> String { let s = format!("{:?}", path); s.strip_prefix('"') -- cgit v1.3.1