markdown file rewrite