(gather-fact nav)
Make docstring notation out of fact form (-> "^{:refer example/hello-world :added "0.1"} (fact "Sample test program"\n (+ 1 1) => 2\n (long? 3) => true)" (nav/parse-string) nav/down nav/right nav/down nav/right (gather-fact) (update-in [:test] docstring/->docstring)) => (just-in {:form 'fact :ns 'example, :var 'hello-world, :refer 'example/hello-world :added "0.1", :line {:row 2, :col 8, :end-row 4, :end-col 21} :intro "Sample test program", :sexp h/form? :test "\n (+ 1 1) => 2\n (long? 3) => true"})
Make docstring notation out of fact form (-> "^{:refer example/hello-world :added \"0.1\"} (fact \"Sample test program\"\n (+ 1 1) => 2\n (long? 3) => true)" (nav/parse-string) nav/down nav/right nav/down nav/right (gather-fact) (update-in [:test] docstring/->docstring)) => (just-in {:form 'fact :ns 'example, :var 'hello-world, :refer 'example/hello-world :added "0.1", :line {:row 2, :col 8, :end-row 4, :end-col 21} :intro "Sample test program", :sexp h/form? :test "\n (+ 1 1) => 2\n (long? 3) => true"})
(gather-fact-body nav)
(gather-fact-body nav output)
helper function for gather-fact
(-> "(\n (+ 1 1) => 2\n (long? 3) => true)"
nav/parse-string
nav/down
(gather-fact-body)
(docstring/->docstring))
=> "\n (+ 1 1) => 2\n (long? 3) => true"
helper function for `gather-fact` (-> "(\n (+ 1 1) => 2\n (long? 3) => true)" nav/parse-string nav/down (gather-fact-body) (docstring/->docstring)) => "\n (+ 1 1) => 2\n (long? 3) => true"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close