Skip to main content

format_yaml

Function format_yaml 

Source
pub fn format_yaml(input: &str) -> String
Expand description

Formats YAML / YML content matching VS Code esbenp.prettier-vscode (tabWidth: 2, singleQuote: true, bracketSpacing: true, LF).

§Arguments

  • &str - Raw YAML or YML document text.

§Returns

  • String - Formatted YAML document ending with a single \n.