Greetings,

I have written a small markdown exporter that improves over the default one for publication with http://leanpub.com.  In particular, it separates code from its output, and it handles footnotes properly.  It's a very limited one-morning hack, but I thought it might be of interest to others:

https://github.com/juanre/ox-leanpub

(I am writing a book with lots of code samples and their output.  Exporting for the web was simple:

http://juanreyero.com/hacker-ways/terminal.html

but going to ebook required more work :-)

Best,

jm
--
http://greaterskies.com
http://juanreyero.com