fix critical bug
This commit is contained in:
parent
a3b15674d5
commit
e3416a6181
9
setup.go
9
setup.go
|
@ -203,7 +203,14 @@ func getFrontMatter(conf *Config) string {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format)
|
fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format)
|
||||||
} else {
|
} else {
|
||||||
bytes = frontmatter.AppendRune(bytes, frontmatter.StringFormatToRune(format))
|
r, err := frontmatter.StringFormatToRune(format)
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format)
|
||||||
|
return format
|
||||||
|
}
|
||||||
|
|
||||||
|
bytes = frontmatter.AppendRune(bytes, r)
|
||||||
f, err := frontmatter.Unmarshal(bytes)
|
f, err := frontmatter.Unmarshal(bytes)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue