ref: 088d46a804fc9345203fdcf90964b195775fa0e0
parent: 08219161dd48d952085dd2e421dc7b005319684c
author: Anthony Fok <[email protected]>
date: Sun Feb 8 04:50:01 EST 2015
parser.FormatSanitize() MetaDataFormat for date too So that the date would come out correctly with variations like `MetaDataFormat = "YAML"` in addition to the normally expected `MetaDataFormat = "yaml"`. Fixes #865.
--- a/create/content.go
+++ b/create/content.go
@@ -98,7 +98,7 @@
return err
}
- if x := viper.GetString("MetaDataFormat"); x == "json" || x == "yaml" || x == "toml" {
+ if x := parser.FormatSanitize(viper.GetString("MetaDataFormat")); x == "json" || x == "yaml" || x == "toml" {
newmetadata["date"] = time.Now().Format(time.RFC3339)
}