about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/microformats/parser.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index eade3dc..cd57693 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -101,6 +101,15 @@
           %
           (apply str (persistent! (html/emit-tag % (transient []))))) el))
 
+(defn- node-to-text
+  "Turn a node into a text string"
+  [content]
+  (->> content
+       html/texts
+       (map #(str/replace % #"\s+" " "))
+       (apply str)
+       str/trim))
+
 (defn get-e-value
   "Get the e-x propery value of an element"
   [el]