Adds markdown formatting to output cells

PR for #4756

Not too familiar with the codebase, so if I missed something let me know. Thanks!