fix bug related to objects within arrays / frontmatter

This commit is contained in:
Henrique Dias 2016-02-07 16:29:56 +00:00
parent 984a57b0b3
commit 7ce34e0422
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ func handleObjects(content interface{}, parent *frontmatter, name string) *front
if parent.Name == mainName { if parent.Name == mainName {
c.Name = c.Title c.Name = c.Title
} else if parent.Type == "array" {
c.Name = parent.Name + "[]"
} else { } else {
c.Name = parent.Name + "[" + c.Title + "]" c.Name = parent.Name + "[" + c.Title + "]"
} }