1<p>These should all get escaped:</p>
2<p>Backslash: \</p>
3<p>Backtick: `</p>
4<p>Asterisk: *</p>
5<p>Underscore: _</p>
6<p>Left brace: {</p>
7<p>Right brace: }</p>
8<p>Left bracket: [</p>
9<p>Right bracket: ]</p>
10<p>Left paren: (</p>
11<p>Right paren: )</p>
12<p>Greater-than: ></p>
13<p>Hash: #</p>
14<p>Period: .</p>
15<p>Bang: !</p>
16<p>Plus: +</p>
17<p>Minus: -</p>
18<p>These should not, because they occur within a code block:</p>
19<pre><code>Backslash: \\
20
21Backtick: \`
22
23Asterisk: \*
24
25Underscore: \_
26
27Left brace: \{
28
29Right brace: \}
30
31Left bracket: \[
32
33Right bracket: \]
34
35Left paren: \(
36
37Right paren: \)
38
39Greater-than: \&gt;
40
41Hash: \#
42
43Period: \.
44
45Bang: \!
46
47Plus: \+
48
49Minus: \-
50</code></pre>
51<p>Nor should these, which occur in code spans:</p>
52<p>Backslash: <code>\\</code></p>
53<p>Backtick: <code>\`</code></p>
54<p>Asterisk: <code>\*</code></p>
55<p>Underscore: <code>\_</code></p>
56<p>Left brace: <code>\{</code></p>
57<p>Right brace: <code>\}</code></p>
58<p>Left bracket: <code>\[</code></p>
59<p>Right bracket: <code>\]</code></p>
60<p>Left paren: <code>\(</code></p>
61<p>Right paren: <code>\)</code></p>
62<p>Greater-than: <code>\&gt;</code></p>
63<p>Hash: <code>\#</code></p>
64<p>Period: <code>\.</code></p>
65<p>Bang: <code>\!</code></p>
66<p>Plus: <code>\+</code></p>
67<p>Minus: <code>\-</code></p>
68