Converting doc to markdown