From b0c52c2e896bd485e7f09dafe0ca3d51aba3987a Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sun, 27 Aug 2023 13:31:37 +0800 Subject: [PATCH] [back/refactor] for -> doseq --- src/main/backend/handlers.clj | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/backend/handlers.clj b/src/main/backend/handlers.clj index 97dd000..7bc6e82 100644 --- a/src/main/backend/handlers.clj +++ b/src/main/backend/handlers.clj @@ -15,13 +15,12 @@ [docs] (-> (.select docs "style[data-emotion-css~=^[a-z0-9]*$]") (.remove)) - (vec - (for [a (.select docs "a")] - (.attr a "href" - (-> (.attr a "href") - (str/replace "https://link.zhihu.com/?target=" "") - (str/replace "https://zhuanlan.zhihu.com/p/" "#/item/") - (url-decode)))))) + (doseq [a (.select docs "a")] + (.attr a "href" + (-> (.attr a "href") + (str/replace "https://link.zhihu.com/?target=" "") + (str/replace "https://zhuanlan.zhihu.com/p/" "#/item/") + (url-decode))))) (defn clean-images @@ -30,9 +29,8 @@ (.remove)) (-> (.select docs "figure > noscript") (.tagName "div")) - (vec - (for [img (.select docs "figure > div > img")] - (.attr img "loading" "lazy")))) + (doseq [img (.select docs "figure > div > img")] + (.attr img "loading" "lazy"))) (defn render-linkcard