Clean up invalid Markdown format