about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2014-09-28 19:01:05 +0100
committerAlan Pearce2014-09-28 19:01:05 +0100
commitb1e28b8b122a46951ab8e17f010ab58fd06f9524 (patch)
tree3154931b9d9772cf281a71753b7657f7664985ed /src
parent5cc13ae3cec7a1778df2994d27a5594004f9a45a (diff)
downloadmicroformats-b1e28b8b122a46951ab8e17f010ab58fd06f9524.tar.lz
microformats-b1e28b8b122a46951ab8e17f010ab58fd06f9524.tar.zst
microformats-b1e28b8b122a46951ab8e17f010ab58fd06f9524.zip
Fix parse failure with spaces preceding HTML
Diffstat (limited to 'src')
-rw-r--r--src/microformats/parser.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index 9377d4a..32d0331 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -279,5 +279,5 @@
 (defn parse
   "Parse a HTML string with microformats"
   [html]
-  (let [document (html/html-snippet html)]
+  (let [document (html/html-snippet (str/trim html))]
     {:items (mapv parse-h (some->> document z/xml-zip select-h)) :rels (parse-rels document)}))