about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/microformats/parser.clj13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index fb0dc0d..9712108 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -174,13 +174,12 @@
 (defn parse-h
   "Parse h-* classes within a HTML element."
   [element]
-  (let [el (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 :type (get-mf-names element)
-              :properties (merge (parse-implied element)
-                                 (apply merge (map #(apply merge %) (map (juxt parse-p parse-u parse-dt parse-e) el)))))))
+  (hash-map :type (get-mf-names element)
+            :properties (merge (parse-implied element)
+                               (apply merge (map parse-p (html/select element [(html/attr-starts :class "p-")])))
+                               (apply merge (map parse-u (html/select element [(html/attr-starts :class "u-")])))
+                               (apply merge (map parse-dt (html/select element [(html/attr-starts :class "dt-")])))
+                               (apply merge (map parse-e (html/select element [(html/attr-starts :class "e-")]))))))
 
 (defn select-h
   "Select h-* elements within a HTML document."