转载:Escaping backtick in Markdown - Growing with the Web

The backtick (also known as the grave accent or backquote) is used to start a code section in Markdown, because of this it’s a little tricky to include it without triggering the code formatting in a page. This snippet demonstrates the various ways of displaying a backtick.

# Backtick outside code

To include a non-code formatted backtick it can be added by escaping it with a \ .

1
\`

# Backtick within code

Wrapping inline code blocks in double backticks instead of single backticks allow a backtick to be used.

1
`` ` ``

such as `` ` this is a test ` `` will be `this is a test`

Alternatively a code block can be used, this will wrap everything in a <pre> however. To do this either indent 4 spaces to start a code block

1
`

or use fenced code blocks if supported

1
2
3
```
`
​```
Edited on