convert table to markdown format