Skip to main content

format_with_config

Function format_with_config 

Source
pub fn format_with_config(input: &str, config: &FormatConfig) -> Result<String>
Expand description

Auto-formats a messy YAML file into a canonical style based on the CST, using the provided configuration.

The input is parsed under ParserConfig::default; use format_with_parser_config to choose the limits.