-
-
Save Chouser/270300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn print-markdown-doc | |
"This is a modified version of print-doc which outputs the documentation in markdown format." | |
[v] | |
(let [{:keys [ns name arglists macro doc]} (meta v)] | |
(into [(format "###%s###" name) ""] | |
(->> (str " *" (ns-name ns) "/" name "*\n\n" | |
" :::clojure\n" | |
" " arglists "\n\n" | |
(when macro "*Macro*\n") | |
" " doc) | |
(.split #"\n") | |
(map #(str ">" %)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment