cond-let: use % instead of x as anaphor
1 file changed, 5 insertions(+), 5 deletions(-)
changed files
M src/microformats/parser.clj → src/microformats/parser.clj
@@ -6,7 +6,7 @@ (defmacro cond-let [& clauses] (when clauses - (list 'if-let ['x (first clauses)] + (list 'if-let ['% (first clauses)] (if (next clauses) (second clauses) (throw (IllegalArgumentException.@@ -179,13 +179,13 @@ :abbr (-> element :attrs :title) :img (-> element :attrs :alt) (cond-let (first (html/select element [html/root :> [:img html/only-child]])) - (-> x :attrs :alt) + (-> % :attrs :alt) (first (html/select element [html/root :> [:abbr html/only-child (html/attr? :title)]])) - (-> x :attrs :title) + (-> % :attrs :title) (first (html/select element [html/root :> html/only-child :> [:img html/only-child]])) - (-> x :attrs :alt) + (-> % :attrs :alt) (first (html/select element [html/root :> html/only-child :> [:abbr html/only-child (html/attr? :title)]])) - (-> x :attrs :title) + (-> % :attrs :title) true (node-to-text (:content element))))) (defn- imply-url