From eaf3f2052b41f813a30a081b3882136fa178a538 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 Sep 2014 18:34:11 +0100 Subject: Parse multiple types of properties on a single element --- 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 eee04c4..03e543f 100644 --- a/src/microformats/parser.clj +++ b/src/microformats/parser.clj @@ -227,10 +227,10 @@ [element] (let [cappend (partial merge-with concat)] (merge (parse-implied element) - (apply cappend (map parse-p (html/select element [(html/attr-starts :class "p-")]))) - (apply cappend (map parse-u (html/select element [(html/attr-starts :class "u-")]))) - (apply cappend (map parse-dt (html/select element [(html/attr-starts :class "dt-")]))) - (apply cappend (map parse-e (html/select element [(html/attr-starts :class "e-")])))))) + (apply cappend (map parse-p (html/select element [(html/attr-contains :class "p-")]))) + (apply cappend (map parse-u (html/select element [(html/attr-contains :class "u-")]))) + (apply cappend (map parse-dt (html/select element [(html/attr-contains :class "dt-")]))) + (apply cappend (map parse-e (html/select element [(html/attr-contains :class "e-")])))))) (defn parse-h "Parse h-* classes within a HTML element." @@ -241,7 +241,7 @@ (defn select-h "Select h-* elements within a HTML document." [element] - (html/select element [(html/attr-starts :class "h-")])) + (html/select element [(html/attr-contains :class "h-")])) (defn parse-rel "Parse rel attributes of an HTML link element" -- cgit 1.4.1