Created
October 4, 2014 22:53
-
-
Save greenwellness/94d691f6902f5c7aaaec to your computer and use it in GitHub Desktop.
Asciidoc Clojure
This file contains hidden or 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
(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