From 48080bca77ece06031d013534d8a9399f2bbae0c Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Thu, 5 Jul 2018 21:57:25 +0200 Subject: [PATCH] Try to implement h-feed --- cmd/eksterd/simplify.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/eksterd/simplify.go b/cmd/eksterd/simplify.go index 05137c0..777f26e 100644 --- a/cmd/eksterd/simplify.go +++ b/cmd/eksterd/simplify.go @@ -107,6 +107,14 @@ func simplifyMicroformat(item *microformats.Microformat) map[string]interface{} func simplifyMicroformatData(md *microformats.Data) []map[string]interface{} { items := []map[string]interface{}{} for _, item := range md.Items { + if len(item.Type) >= 1 && item.Type[0] == "h-feed" { + for _, childItem := range item.Children { + newItem := simplifyMicroformat(childItem) + items = append(items, newItem) + } + return items + } + newItem := simplifyMicroformat(item) items = append(items, newItem) if c, e := newItem["children"]; e {