Agree with @Nmath's recommendations overall (wouldn't mind seeing a Community Wiki question and answer for this), but I'd add that there are some situations where Block Quotes + Inline Code Fences improveimproves readability.
❌ Using code-block (triple-backticks) or inline code (single-backticks): Difficult to read. Critical information can be difficult to find while manually sliding the horizontal scrollbar:
A really long error message or output that is easily readable on your screen due to the terminal automatically wrapping. It includes important information throughout the output. It may even include multiple sentences since some output just assumes it will line-wrap, and forgoes any line-breaks. These can sometimes be hundreds of characters long and therefore very difficult to read with a scrollbar in a pure code-fence.
❌ Using a block-quote: Semantically correct (you are, after all, quoting the error message), but doesn't fully provide the "visual indicator" that this is
output
:A really long error message or output that is easily readable on your screen due to the terminal automatically wrapping. It includes important information throughout the output. It may even include multiple sentences since some output just assumes it will line-wrap, and forgoes any line-breaks. These can sometimes be hundreds of characters long and therefore very difficult to read with a scrollbar in a pure code-fence.
✅ Using a block-quote + inline (single backtick): Best compromise between being semantically correct, readable, and providing proper visual queues
A really long error message or output that is easily readable on your screen due to the terminal automatically wrapping. It includes important information throughout the output. It may even include multiple sentences since some output just assumes it will line-wrap, and forgoes any line-breaks. These can sometimes be hundreds of characters long and therefore very difficult to read with a scrollbar in a pure code-fence.