Skip to main content

format

Function format 

Source
pub fn format(source: &str, name: &str) -> Result<String, Diagnostic>
Expand description

Re-indents source (four spaces a level, normalized spacing at line starts), keeping comments and everything else as written. Fails when the source does not parse (within the memory check may use).