Based on Kenneth Reitz Pandoc wrapper