markdown encoder from daringfireball.net
very first version

this does not work correctly