PSA: Please Enclose Your Paste in Code Blocks

Hi there,

There has been an uptick in pasting code and crash reports recently that are not being enclosed in code blocks. This makes it more difficult on readers because the forum software does things like attempt to parse markdown and convert quotes to smartquotes.

When you paste something, please enclose it in code blocks. That’s three backticks: ```

You can disable code highlighting for crash logs by declaring the language as text like this:

<crashlog paste>

Thank you in advance.


I didn’t know about the “text” thing. Good tip.

Something weird is going on with the coloring hints though. If I were to tell it xml I get no syntax coloring, but if I leave the hint off it correctly guesses that the content is xml and colors accordingly.

1 Like

Other methods:

  • paste data, select it, then click the ‘Preformatted Text’ button in the toolbar:
  • (on mac) hit Command-E before pasting, which will give you this:

I have not seen this work on Mobile though.

Discourse forum has a number of handy “Are you sure?” warnings, such as:

  • that URL has already been included in the chat
  • this thread was marked as closed already
  • you are posting too much

I wonder if Discourse could be set up to warn:

  • “Hey, thats a lot of text, perhaps you want to include it in a code block?”

Another idea is to use the [ details ] tag like this:

Here’s my crash log:

My very long crash log
... a whole bunch of text
... a whole bunch of text
... a whole bunch of text
... a whole bunch of text
... a whole bunch of text
... a whole bunch of text

You get the ‘Hide Details’ option using the Gear icon:


I keep saying this to people… It really does make a difference.

1 Like

We just need to be kind and ask nicely. Not everyone spends as much time here as we do :wink:


I always am… at least I hope I am. :slight_smile: