From 3b8ada28520382dfb13d9450097351a2b70fb534 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sat, 8 Sep 2018 13:56:59 +0200 Subject: [PATCH] Don't add children from items --- pkg/jf2/simplify.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkg/jf2/simplify.go b/pkg/jf2/simplify.go index 7fcd30f..9acdbaf 100644 --- a/pkg/jf2/simplify.go +++ b/pkg/jf2/simplify.go @@ -176,19 +176,20 @@ func SimplifyMicroformatData(md *microformats.Data) []map[string]interface{} { } newItem := SimplifyMicroformat(item, nil) - if newItem["type"] == "entry" || newItem["type"] == "event" || newItem["type"] == "card" { - items = append(items, newItem) - } - if c, e := newItem["children"]; e { - if ar, ok := c.([]map[string]interface{}); ok { - for _, item := range ar { - if item["type"] == "entry" || item["type"] == "event" || item["type"] == "card" { - items = append(items, item) - } - } - } - delete(newItem, "children") - } + delete(newItem, "children") + // if newItem["type"] == "entry" || newItem["type"] == "event" || newItem["type"] == "card" { + // items = append(items, newItem) + // } + // if c, e := newItem["children"]; e { + // if ar, ok := c.([]map[string]interface{}); ok { + // for _, item := range ar { + // if item["type"] == "entry" || item["type"] == "event" || item["type"] == "card" { + // items = append(items, item) + // } + // } + // } + // delete(newItem, "children") + // } } return items }