Limit markdown render test helpers to test builds

Gate width-and-cwd test-only markdown render entrypoints behind cfg(test) so rust-ci clippy no longer fails on dead code in tui_app_server, while keeping tui and tui_app_server consistent.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-03-16 15:30:14 -07:00
parent 7af548f57e
commit e9f706d6d8
2 changed files with 4 additions and 0 deletions

View File

@@ -108,6 +108,7 @@ pub(crate) fn render_markdown_text_with_options(
}
/// Render markdown using the current process working directory for local file-link display.
#[cfg(test)]
pub(crate) fn render_markdown_text_with_width(input: &str, width: Option<usize>) -> Text<'static> {
render_markdown_text_with_width_and_options(input, width, MarkdownRenderOptions::default())
}
@@ -126,6 +127,7 @@ pub(crate) fn render_markdown_text_with_width_and_options(
/// The `cwd` parameter controls how absolute local targets are shortened before display. Passing
/// the session cwd keeps full renders, history cells, and streamed deltas visually aligned even
/// when rendering happens away from the process cwd.
#[cfg(test)]
pub(crate) fn render_markdown_text_with_width_and_cwd(
input: &str,
width: Option<usize>,

View File

@@ -108,6 +108,7 @@ pub(crate) fn render_markdown_text_with_options(
}
/// Render markdown using the current process working directory for local file-link display.
#[cfg(test)]
pub(crate) fn render_markdown_text_with_width(input: &str, width: Option<usize>) -> Text<'static> {
render_markdown_text_with_width_and_options(input, width, MarkdownRenderOptions::default())
}
@@ -126,6 +127,7 @@ pub(crate) fn render_markdown_text_with_width_and_options(
/// The `cwd` parameter controls how absolute local targets are shortened before display. Passing
/// the session cwd keeps full renders, history cells, and streamed deltas visually aligned even
/// when rendering happens away from the process cwd.
#[cfg(test)]
pub(crate) fn render_markdown_text_with_width_and_cwd(
input: &str,
width: Option<usize>,