From 70dc8d090fd68def5651c28f3fe1ab0d854bee30 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sun, 21 Jun 2026 11:47:40 +0300 Subject: Improve module/function docs in path_display --- src/util/path_display.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/util/path_display.rs b/src/util/path_display.rs index d7bd624..78ff989 100644 --- a/src/util/path_display.rs +++ b/src/util/path_display.rs @@ -1,12 +1,15 @@ -//! Path display helpers. +//! Helpers for displaying filesystem paths in generated Markdown. 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. +/// The returned string uses Rust's debug-style path formatting so that unusual characters remain +/// visible instead of affecting the Markdown structure. For example, embedded newlines are shown as +/// `\n`, and invalid UTF-8 bytes are escaped. +/// +/// Surrounding quotes added by debug formatting are stripped when present, so ordinary paths remain +/// easy to read. pub fn display_path(path: &Path) -> String { let s = format!("{:?}", path); s.strip_prefix('"') -- cgit v1.3.1