Skip to content

Instantly share code, notes, and snippets.

@devn
Created January 6, 2010 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save devn/270299 to your computer and use it in GitHub Desktop.
Save devn/270299 to your computer and use it in GitHub Desktop.
(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