Browse Source

Inlining link separator code

master
Stephen Starkey 5 months ago
parent
commit
c8c4e984d4
  1. 9
      src/calmabiding/core.clj

9
src/calmabiding/core.clj

@ -7,14 +7,15 @@
[clojure.java.io :as io]
[clojure.string :as str]))
(defn link-separator []
(str/join "" [" " "·" " "]))
(defn link-group
"Take the container (a collection), append the links, interleaved with link-separators,
to the end, and convert the result to a vector"
[container & links]
(vec (concat container (drop-last (interleave links (repeat (link-separator)))))))
(let [separator (str/join "" [" " "·" " "])
separators (repeat separator)]
(->> (-> links (interleave separators) drop-last)
(concat container)
vec)))
(defn wrap-contents [stylesheet contents]
(str "<!DOCTYPE html>"

Loading…
Cancel
Save