about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2014-09-15 20:03:43 +0100
committerAlan Pearce2014-09-15 20:03:43 +0100
commitafd0a7540b18dd713a93ad144307da8fac0b2857 (patch)
tree2f5ab22863e15988787d636aaa43829366be39d9 /src
parent16c845fbe5963f29c6b65991ef792ace84893673 (diff)
downloadmicroformats-afd0a7540b18dd713a93ad144307da8fac0b2857.tar.lz
microformats-afd0a7540b18dd713a93ad144307da8fac0b2857.tar.zst
microformats-afd0a7540b18dd713a93ad144307da8fac0b2857.zip
Fix errors in parse-children
Diffstat (limited to 'src')
-rw-r--r--src/microformats/parser.clj10
1 files changed, 5 insertions, 5 deletions
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."