Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

cegdown

Cegdown is a simple little Clojure wrapper for the excellent Pegdown markdown parsing library.

Usage

You'll want to require it first:

user> (require '[me.raynes.cegdown :as md])
nil

Now you can generate some HTML from a bit of markdown:

user> (md/to-html "# hi\nhow are you")
"<h1>hi</h1><p>how are you</p>"

Pegdown has lots of extensions. You can use them with to-html. Just pass it a sequence of keywords. For example, if we wanted fenced code blocks (like this README uses):

user> (md/to-html "```clojure\n(+ 3 3)\n```" [:fenced-code-blocks])
"<pre><code class=\"clojure\">(+ 3 3)\n</code></pre>"

Easy enough, right?

License

Copyright © 2012 Anthony Grimes

Distributed under the Eclipse Public License, the same as Clojure.

About

A thin Clojure wrapper for the pegdown markdown parsing library

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
You can’t perform that action at this time.