From afd0a7540b18dd713a93ad144307da8fac0b2857 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 15 Sep 2014 20:03:43 +0100 Subject: Fix errors in parse-children --- src/microformats/parser.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj index 573d3e2..ac7aef2 100644 --- a/src/microformats/parser.clj +++ b/src/microformats/parser.clj @@ -130,11 +130,11 @@ (defn parse-children "Parse element children for microformats" [element] - (let [el (first (html/select element {(html/attr-starts :class "p-") - (html/attr-starts :class "u-") - (html/attr-starts :class "dt-") - (html/attr-starts :class "e-")}))] - (hash-map :properties (merge ((juxt parse-p parse-u parse-dt parse-e)))))) + (let [el (first (html/select element [(html/union [(html/attr-starts :class "p-") + (html/attr-starts :class "u-") + (html/attr-starts :class "dt-") + (html/attr-starts :class "e-")])]))] + (hash-map :properties (apply merge ((juxt parse-p parse-u parse-dt parse-e) el))))) (defn parse-h "Parse h-* classes within a HTML document." -- cgit 1.4.1