Skip to content

Instantly share code, notes, and snippets.

@greenwellness
Created October 4, 2014 22:53
Show Gist options
  • Save greenwellness/94d691f6902f5c7aaaec to your computer and use it in GitHub Desktop.
Save greenwellness/94d691f6902f5c7aaaec to your computer and use it in GitHub Desktop.
Asciidoc Clojure
(ns foo
(:import java.util.Collections
(org.asciidoctor Asciidoctor$Factory
Asciidoctor)))
(defn render [doc]
(let [^Asciidoctor ad (.. Asciidoctor$Factory create)]
(.render ad doc
(Collections/emptyMap))))
(def txt
"= Foo
:welcome: Hello
:toc:
== Welcome
Nothing {welcome} to do
")
(render txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment