Fix error parsing dt value from unexpected element
2 files changed, 5 insertions(+), 1 deletion(-)
M src/microformats/parser.clj → src/microformats/parser.clj
@@ -135,7 +135,8 @@ :ins (-> el :attrs :datetime) :del (-> el :attrs :datetime) :abbr (-> el :attrs :title) :data (-> el :attrs :value) - :input (-> el :attrs :value)) + :input (-> el :attrs :value) + nil) (node-to-text (:content el)) "")))
M test/microformats/parser_expectations.clj → test/microformats/parser_expectations.clj
@@ -130,6 +130,9 @@ (expect {:start '("2012-08-05T14:50")} (parse-dt (snippet "<input class=\"dt-start\" value=\"2012-08-05T14:50\">"))) +(expect {:start '("2012-08-05T14:50")} + (parse-dt (snippet "<span class=\"dt-start\">2012-08-05T14:50</span>"))) + (expect {:content '({:html "Here is a load of <strong>embedded markup</strong>" :value "Here is a load of embedded markup"})} (parse-e (snippet "<div class=\"e-content\">Here is a load of <strong>embedded markup</strong></div>")))