Jack Douglas
We are working on [TiO](https://tio.run) (Try It Online) integration for live code editing in posts and comments (similar to db<>fiddle integration).
We need to settle on a 'one-boxing' character that works for the three forms of code entry:
1. ```
$ echo Hello, World!
```
2. ```
$$$
echo Hello, World!
$$$
```
3. ```
$$$ bash
echo Hello, World!
$$$
```
`$` might be a good choice but it clashes with MathJax input on those communities where it is enabled.
**What character shall we use instead?**
It should:
* be memorable
* be broadly idiomatic in it's association with code
* not clash with established markdown (like `#`)
* ideally be rare at the start of a line in any language
Top Answer
Adám
backtick `` ` ``
Wait, what‽ how can that possibly work? Well, it just needs the TIO symbol:
1. ```
`: echo Hello, World!
```
2. ````
```:
echo Hello, World!
```
````
3. ````
```: bash
echo Hello, World!
```
````
A benefit of this is that you can change a code block into an executing code block simply by adding colon `:`. As the only one besides for Jack Douglas who has actually used this feature, I can tell you that the live coding (sending off a request to TIO for every keystroke) can be a bit much, especially if your code generates a large error report (think Java!) while unfinished. It is therefore convenient to be able to write your code as a normal code block (with monospace font and syntax colouring) and only add the activating character at the end. Making it a single character makes it easy to turn live preview on and off.
Answer #2
Adám
~~Colon `:`~~ CLASHES WITH [CUSTOM CONTAINERS](https://github.com/markdown-it/markdown-it-container)
1. ```
: echo Hello, World!
```
2. ```
:::
echo Hello, World!
:::
```
3. ```
::: bash
echo Hello, World!
:::
```
As far as I can tell, no programming language uses a leading colon followed by a space.
The only possible confusing is with `:smile:` but again this requires the symbol name to immediately follow the leading colon.
Answer #3
Jack Douglas
Pipe `|`
1. ```
| echo Hello, World!
```
2. ```
|||
echo Hello, World!
|||
```
3. ```
||| bash
echo Hello, World!
|||
```
Answer #4
Jack Douglas
Smaller Than `<`
1. ```
< echo Hello, World!
```
2. ```
<<<
echo Hello, World!
<<<
```
3. ```
<<< bash
echo Hello, World!
<<<
```
Answer #5
Jack Douglas
Exclamation Mark `!`
1. ```
! echo Hello, World!
```
2. ```
!!!
echo Hello, World!
!!!
```
3. ```
!!! bash
echo Hello, World!
!!!
```
Answer #6
Jack Douglas
Semicolon `;`
1. ```
; echo Hello, World!
```
2. ```
;;;
echo Hello, World!
;;;
```
3. ```
;;; bash
echo Hello, World!
;;;
```
Answer #7
Adám
Quote `'`
1. ```
' echo Hello, World!
```
2. ```
'''
echo Hello, World!
'''
```
3. ```
''' bash
echo Hello, World!
'''
```
Answer #8
Jack Douglas
Percent `%`
1. ```
% echo Hello, World!
```
2. ```
%%%
echo Hello, World!
%%%
```
3. ```
%%% bash
echo Hello, World!
%%%
```
Answer #9
RikedyP
Split pipe
```
¦ echo Hello
```
```
¦¦¦
echo Hello
¦¦¦
```
```
¦¦¦ bash
echo Hello
¦¦¦
```
I don't think it's particularly associated with code, but I think it looks clean