Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
; dependencies:
; http://build.clojure.org/releases/org/clojure/clojure/1.2.0/clojure-1.2.0.jar
; http://github.com/downloads/sirthias/parboiled/parboiled4j-0.9.8.2.jar
; http://github.com/downloads/sirthias/pegdown/pegdown-0.8.5.3.jar
(import 'org.pegdown.PegDownProcessor)
(def input-text "
A First Level Header
====================
A Second Level Header
---------------------
Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.
The quick brown fox jumped over the lazy
dog's back.
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
Some source code:
(defn foo [bar]
(bat bar))
")
(defn render [input]
(.markdownToHtml (PegDownProcessor.) input))
(print (render input-text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.