editor updates

This commit is contained in:
Henrique Dias
2015-09-15 19:26:18 +01:00
parent f931bb3ed0
commit e045d76bcd
8 changed files with 206 additions and 98 deletions

View File

@@ -36,6 +36,7 @@ func Execute(w http.ResponseWriter, r *http.Request) (int, error) {
// The main content of the file
mainContent := rawFile["content"].(string)
mainContent = "\n\n" + strings.TrimSpace(mainContent)
// Removes the main content from the rest of the frontmatter
delete(rawFile, "content")
@@ -86,7 +87,7 @@ func Execute(w http.ResponseWriter, r *http.Request) (int, error) {
file, err := parser.ReadFrom(reader)
inf := new(information)
inf.Content = string(file.Content())
inf.Content = strings.TrimSpace(string(file.Content()))
inf.FrontMatter, err = frontmatter.Pretty(file.FrontMatter())
if err != nil {