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.clj20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index f89ed8f..836fdcb 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -32,7 +32,7 @@
            :class
            split-classes))
 
-(defn get-p-property
+(defn get-p-value
   "Get the p-x property value of an element"
   [el]
   (or (case (:tag el)
@@ -45,7 +45,7 @@
       (first (:content el))
       ""))
 
-(defn get-u-property
+(defn get-u-value
   "Get the u-x property value of an element"
   [el]
   (or (case (:tag el)
@@ -53,11 +53,11 @@
         :area (-> el :attrs :href)
         :img (-> el :attrs :src)
         :object (-> el :attrs :data)
-        (get-p-property el))
+        (get-p-value el))
       (first :content el)
       ""))
 
-(defn get-dt-property
+(defn get-dt-value
   "Get the dt-x property value of an element"
   [el]
   (or (case (:tag el)
@@ -73,20 +73,20 @@
 (defn parse-p
   "Parse p-* classes within HTML element."
   [element]
-  (let [prop (get-p-property element)]
-    (into {} (r/map #(hash-map % prop) ((classes-to-props "p-") (element-to-classes element))))))
+  (let [value (get-p-value element)]
+    (into {} (r/map #(hash-map % value) ((classes-to-props "p-") (element-to-classes element))))))
 
 (defn parse-u
   "Parse u-* classes within HTML element"
   [element]
-  (let [prop (get-u-property element)]
-    (into {} (r/map #(hash-map % prop) ((classes-to-props "u-") (element-to-classes element))))))
+  (let [value (get-u-value element)]
+    (into {} (r/map #(hash-map % value) ((classes-to-props "u-") (element-to-classes element))))))
 
 (defn parse-dt
   "Parse dt-* classes within HTML element"
   [element]
-  (let [prop (get-dt-property element)]
-    (into {} (r/map #(hash-map % prop) ((classes-to-props "dt-") (element-to-classes element))))))
+  (let [value (get-dt-value element)]
+    (into {} (r/map #(hash-map % value) ((classes-to-props "dt-") (element-to-classes element))))))
 
 (defn parse-children
   "Parse element children for microformats"