about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2014-09-10 19:28:33 +0100
committerAlan Pearce2014-09-10 19:28:33 +0100
commit94aa44b7d5a33ca2a0efe0a72a582d24d65c0657 (patch)
tree8fc9062cbdaa017bdc578501480e1bf2c00b5c38 /src
parentcba956458645f10a83d9f44f40b30e422de8ec63 (diff)
downloadmicroformats-94aa44b7d5a33ca2a0efe0a72a582d24d65c0657.tar.lz
microformats-94aa44b7d5a33ca2a0efe0a72a582d24d65c0657.tar.zst
microformats-94aa44b7d5a33ca2a0efe0a72a582d24d65c0657.zip
Expand selectors to match classes with prefixes
Diffstat (limited to 'src')
-rw-r--r--src/microformats/parser.clj4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index c44803b..4071e85 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -6,12 +6,12 @@
 (defn parse-p
   "Parse p-* classes within HTML element."
   [element]
-  (hash-map :properties (hash-map :name (first (:content (first (html/select element [:.p-name])))))))
+  (hash-map :properties (hash-map :name (first (:content (first (html/select element [(html/attr-starts :class "p-")])))))))
 
 (defn parse-h
   "Parse h-* classes within a HTML document."
   [html]
-  (mapv parse-p (html/select html [:.h-card])))
+  (mapv parse-p (html/select html [(html/attr-starts :class "h-")])))
 
 (defn parse
   "Parse a HTML string with microformats"