From 388a6a07086c4217a907a8643b27693618c008f2 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 Sep 2014 21:41:36 +0100 Subject: cond-let: use % instead of x as anaphor --- src/microformats/parser.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj index 875caec..f348f3b 100644 --- a/src/microformats/parser.clj +++ b/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 @@ :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 -- cgit 1.4.1