Skip to main content

prepare_content

Function prepare_content 

Source
pub fn prepare_content(file_path: &Path, content: String) -> String
Expand description

Prepare file content for rendering based on its extension.

If the file has a recognized code extension, wrap content in a fenced code block so it renders with syntax highlighting. Image files are wrapped as markdown image references for inline rendering. Markdown and unrecognized files pass through unchanged.