diff options
author | Alan Pearce | 2014-09-24 19:07:20 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-24 19:11:28 +0100 |
commit | b14be70cb06dc34dfc1823c5cf5151a798ac7379 (patch) | |
tree | b6c4166761c1d58b2f857d35fd16319172f14e7e /src | |
parent | abce14ea6914678045a0d69adf182e5a2d5b5ee1 (diff) | |
download | microformats-b14be70cb06dc34dfc1823c5cf5151a798ac7379.tar.lz microformats-b14be70cb06dc34dfc1823c5cf5151a798ac7379.tar.zst microformats-b14be70cb06dc34dfc1823c5cf5151a798ac7379.zip |
Ignore <br> and <hr>, even if they have mf classes
This isn't actually in the spec, but microformats-tests expects it.
Diffstat (limited to 'src')
-rw-r--r-- | src/microformats/parser.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj index 4706992..0454d21 100644 --- a/src/microformats/parser.clj +++ b/src/microformats/parser.clj @@ -223,16 +223,16 @@ :photo (list (parse-implied-photo element))}))) (defn- select-p - [element] (html/select element [(html/attr-contains :class "p-")])) + [element] (html/select element [[(html/but-node #{:br :hr}) (html/attr-contains :class "p-")]])) (defn- select-u - [element] (html/select element [(html/attr-contains :class "u-")])) + [element] (html/select element [[(html/but-node #{:br :hr}) (html/attr-contains :class "u-")]])) (defn- select-dt - [element] (html/select element [(html/attr-contains :class "dt-")])) + [element] (html/select element [[(html/but-node #{:br :hr}) (html/attr-contains :class "dt-")]])) (defn- select-e - [element] (html/select element [(html/attr-contains :class "e-")])) + [element] (html/select element [[(html/but-node #{:br :hr}) (html/attr-contains :class "e-")]])) (defn get-mf-properties "Parse children of a microformat, returning a map of properties" |