parse also *.yml file suffix as YAML; closes #1958 (#1959)

previously only files with *.yaml suffix were recognized as YAML
This commit is contained in:
Radovan Bast 2022-08-10 23:34:12 +02:00 committed by Vincent Prouillet
parent abafe66a51
commit f61e1ba9a2
2 changed files with 2 additions and 2 deletions

View File

@ -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()),
}
}

View File

@ -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.