(->docstring nodes)
converts nodes to a docstring
(->> (nav/parse-root "\n (+ 1 2)\n => 3") (nav/down) (iterate zip/step-right) (take-while zip/get) (map zip/get) (->docstring)) => "\n (+ 1 2)\n => 3"
(->docstring [(block/block \e)]) => "'e'"
converts nodes to a docstring (->> (nav/parse-root "\n (+ 1 2)\n => 3") (nav/down) (iterate zip/step-right) (take-while zip/get) (map zip/get) (->docstring)) => "\n (+ 1 2)\n => 3" (->docstring [(block/block \e)]) => "'e'"
(->docstring-node intro nodes)
converts nodes to a docstring node
(->> (nav/navigator [\e \d \newline]) (zip/step-inside) (iterate zip/step-right) (take-while zip/get) (map zip/get) (->docstring-node "") (block/value)) => "'e' 'd' '\n '"
converts nodes to a docstring node (->> (nav/navigator [\e \d \newline]) (zip/step-inside) (iterate zip/step-right) (take-while zip/get) (map zip/get) (->docstring-node "") (block/value)) => "'e' 'd' '\n '"
(->docstring-tag block)
converts a string representation of block
(->docstring-tag (block/block \c)) => "'c'"
converts a string representation of block (->docstring-tag (block/block \c)) => "'c'"
(->refstring docs)
creates a refstring for use in html blocks
(->> (nav/parse-root ""hello"\n (+ 1 2)\n => 3") (iterate zip/step-right) (take-while zip/get) (map zip/get) (->refstring)) => ""hello"\n (+ 1 2)\n => 3"
creates a refstring for use in html blocks (->> (nav/parse-root "\"hello\"\n (+ 1 2)\n => 3") (iterate zip/step-right) (take-while zip/get) (map zip/get) (->refstring)) => "\"hello\"\n (+ 1 2)\n => 3"
(append-node nav node)
Adds node as well as whitespace and newline on right
(-> (nav/parse-string "(+)") (zip/step-inside) (append-node 2) (append-node 1) (nav/root-string)) => "(+\n 1\n 2)"
Adds node as well as whitespace and newline on right (-> (nav/parse-string "(+)") (zip/step-inside) (append-node 2) (append-node 1) (nav/root-string)) => "(+\n 1\n 2)"
(insert-docstring nav nsp gathered)
inserts the meta information and docstring from tests
inserts the meta information and docstring from tests
(strip-quotes arr)
(strip-quotes [x & more] p1 p2 out)
utility that strips quotes when not the result of a fact
(strip-quotes [""hello""]) => ["hello"]
(strip-quotes ["(str "hello")" " " "=>" " " ""hello""]) => ["(str "hello")" " " "=>" " " ""hello""]
utility that strips quotes when not the result of a fact (strip-quotes ["\"hello\""]) => ["hello"] (strip-quotes ["(str \"hello\")" " " "=>" " " "\"hello\""]) => ["(str \"hello\")" " " "=>" " " "\"hello\""]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close