How do I mark up my code snippets in this forum?

I’ve seen people post code snippets in this forum with nice formatting (e.g. color coding). Am I supposed to put my code snippets in the blockquotes like this?

Blockquote
with Ada.Text_IO;
use Ada.Text_IO;
Blockquote

There! I just proved that using blockquotes doesn’t work.

Markdown!

You’ll want to do:

```ada
with Ada.Text_IO; use Ada.Text_IO;
.``` <- ignore the "." it's just three backticks
1 Like

@AJ-Ianozi If you ever want to escape the triple backticks in markdown, you can precede them with 4 spaces (you also need a blank line above in your post:

```Ada
with Ada.Text_IO;
use Ada.Text_IO;
```

@codiac the above becomes

with Ada.Text_IO;
use Ada.Text_IO;
3 Likes