Showdown's a great library, I use it with some tweaks on http://notepag.es/ for doing markdown/latex math editing. Given it is just a chain of regexes though, modifying it to add new functionality can be a little hairy.
Reminds me of http://showdown.im , which I've been using up until recently. I know they both use the same library, but this one looks like it has syntax highlighting.
http://sharejs.org/wiki/HackerNews
The rendered markdown updates live for you and everyone else viewing the page!