Mode formatting fixes for Markdown