From 94aa44b7d5a33ca2a0efe0a72a582d24d65c0657 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 10 Sep 2014 19:28:33 +0100 Subject: Expand selectors to match classes with prefixes --- src/microformats/parser.clj | 4 ++-- 1 file 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" -- cgit 1.4.1