Skip to content

Instantly share code, notes, and snippets.

@abscondment
Created February 15, 2010 22:48
Show Gist options
  • Save abscondment/305068 to your computer and use it in GitHub Desktop.
Save abscondment/305068 to your computer and use it in GitHub Desktop.
(ns markymark
(:use
[clojure.contrib pprint]
[com.lithinos.clj-peg core string-wrapper]))
(make-parser
{:main markdown
:doc "blah"
:rules (
Doc <- (+ Newline)
Newline <- (| NL [CR (? NL)])
NL <- "\n"
CR <- "\r"
)})
(pprint
(markdown
(wrap-string "\n\r\r\n")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment