format the markdown document