diff --git a/components/templates/src/global_fns/load_data.rs b/components/templates/src/global_fns/load_data.rs index dc6c4210b8..c719495f70 100644 --- a/components/templates/src/global_fns/load_data.rs +++ b/components/templates/src/global_fns/load_data.rs @@ -61,7 +61,7 @@ impl FromStr for OutputFormat { "bibtex" => Ok(OutputFormat::Bibtex), "xml" => Ok(OutputFormat::Xml), "plain" => Ok(OutputFormat::Plain), - "yaml" => Ok(OutputFormat::Yaml), + "yaml" | "yml" => Ok(OutputFormat::Yaml), format => Err(format!("Unknown output format {}", format).into()), } } diff --git a/docs/content/documentation/templates/overview.md b/docs/content/documentation/templates/overview.md index 0e1f17dfaf..b48e8ffb53 100644 --- a/docs/content/documentation/templates/overview.md +++ b/docs/content/documentation/templates/overview.md @@ -259,7 +259,7 @@ The method returns a map containing `width`, `height` and `format` (the lowercas ### `load_data` -Loads data from a file, URL, or string literal. Supported file types include *toml*, *json*, *csv*, *bibtex*, *yaml* +Loads data from a file, URL, or string literal. Supported file types include *toml*, *json*, *csv*, *bibtex*, *yaml*/*yml*, and *xml* and only supports UTF-8 encoding. Any other file type will be loaded as plain text.