Do this :)

Former-commit-id: b064438028afa11cb75f7c58d56e397f60c91755 [formerly 84124f4d9bc46edf14f7eaf52adda519ba32eab6] [formerly 74d80c88cbfa7eda131b8e80aff9fbd2d757a215 [formerly 98af5807f1]]
Former-commit-id: 468e36232a93ace591e467d4565c7a4025437648 [formerly 72b4873d2ce46694aa02fc02e22c8775804c5f18]
Former-commit-id: 9b9b2e1f4ea41507d4cfc2171f9606cba9d330c0
This commit is contained in:
Henrique Dias 2017-06-30 18:03:08 +01:00
parent 012c18cdf1
commit 90ba8e18da
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
<template>
<form id="editor">
<h2 v-if="editor.type == 'complete'">Metadata</h2>
<h2 v-if="editor.type == 'complete'">Body</h2>
</form>
</template>

View File

@ -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":