Fix confusing "yaml/yml" distinction in formats.js
Makes "yml" and "yaml" synonyms for both file extensions and format settings.
This commit is contained in:
parent
2d344ef4ca
commit
30dcc2bdf0
@ -15,6 +15,7 @@ function formatByType(type) {
|
||||
export function formatByExtension(extension) {
|
||||
return {
|
||||
yml: yamlFormatter,
|
||||
yaml: yamlFormatter,
|
||||
json: jsonFormatter,
|
||||
md: FrontmatterFormatter,
|
||||
markdown: FrontmatterFormatter,
|
||||
@ -24,6 +25,7 @@ export function formatByExtension(extension) {
|
||||
|
||||
function formatByName(name) {
|
||||
return {
|
||||
yml: yamlFormatter,
|
||||
yaml: yamlFormatter,
|
||||
frontmatter: FrontmatterFormatter,
|
||||
}[name] || FrontmatterFormatter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user