Created
September 18, 2010 20:13
-
-
Save mmcgrana/586004 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
; 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