Expand selectors to match classes with prefixes
1 file changed, 2 insertions(+), 2 deletions(-)
jump to
M src/microformats/parser.clj → 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"