Created
January 6, 2010 14:25
-
-
Save devn/270299 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] | |
[(str "###" (:name (meta v)) "###\n") | |
(str "> *" (ns-name (:ns (meta v))) "/" (:name (meta v)) "*") | |
(str "> ") | |
(str "> :::clojure") | |
(str "> " (:arglists (meta v)) "") | |
(str "> ") | |
(when (:macro (meta v)) | |
(str "> *Macro*")) | |
(str "> " (re-gsub #"\n" "\n>" (str (:doc (meta v)))))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment