diff --git a/_assets/src/components/Editor.vue b/_assets/src/components/Editor.vue index a8af7cf3..26a9d500 100644 --- a/_assets/src/components/Editor.vue +++ b/_assets/src/components/Editor.vue @@ -1,6 +1,8 @@ diff --git a/file.go b/file.go index b80f7dd1..4a0d9d22 100644 --- a/file.go +++ b/file.go @@ -201,7 +201,7 @@ func (i *file) getEditor(r *http.Request) error { hasRune := frontmatter.HasRune(i.Content) if e.Mode == "frontmatter-only" && !hasRune { - e.FrontMatter.Rune, err = frontmatter.StringFormatToRune(e.Mode) + e.FrontMatter.Rune, err = frontmatter.StringFormatToRune(e.Language) if err != nil { goto Error } @@ -473,11 +473,13 @@ func editorMode(language string) string { } func editorLanguage(mode string) string { - mode = strings.TrimPrefix(".", mode) + mode = strings.TrimPrefix(mode, ".") switch mode { case "md", "markdown", "mdown", "mmark": mode = "markdown" + case "yml": + mode = "yaml" case "asciidoc", "adoc", "ad": mode = "asciidoc" case "rst":