apply markdown formatting