mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
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:
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user