pub fn format_document(
text: &str,
config: &FormatConfig,
) -> Result<String, String>Expand description
Parse an FD document, apply configured transforms, and re-emit canonical text.
The output is idempotent: format_document(format_document(s, c), c) == format_document(s, c).
§Errors
Returns the parser error string if the input is not valid FD syntax.