Skip to main content

format_text_by_path

Function format_text_by_path 

Source
pub fn format_text_by_path(path: &Path, input: &str) -> String
Expand description

Formats text content in memory according to the file type inferred from path.

§Arguments

  • &Path - File path used to determine the target formatter.
  • &str - Raw UTF-8 file content.

§Returns

  • String - Formatted text content (or unchanged input when unsupported).