diff options
author | Alan Pearce | 2014-09-13 10:34:57 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-13 11:23:23 +0100 |
commit | 26fe7047ce98ffac571e4c8665e25b8900830a90 (patch) | |
tree | af2e99526c921b548eb32e11b8b42aae1eb5122c | |
parent | 8b1d5a04c16d2f8a3be5352b06e6b4c815ff4eb2 (diff) | |
download | microformats-26fe7047ce98ffac571e4c8665e25b8900830a90.tar.lz microformats-26fe7047ce98ffac571e4c8665e25b8900830a90.tar.zst microformats-26fe7047ce98ffac571e4c8665e25b8900830a90.zip |
Rename get-*-property functions to get-*-value
-rw-r--r-- | src/microformats/parser.clj | 20 |
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" |