-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMarkdown Special Characters and Escaping.md.txt
51 lines (36 loc) · 1.73 KB
/
Markdown Special Characters and Escaping.md.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Markdown Special Characters and Escaping
This content provides a concise overview of Markdown’s special characters and the method for escaping them using a backslash.
In Markdown, certain characters have special meanings and need to be escaped with a backslash (`\`) to be treated as regular text. This document outlines the characters that require escaping and provides examples.
### Characters That Need to Be Escaped
The following characters have special meanings in Markdown and must be escaped using a backslash (`\`) if you want them to appear as regular text:
- `\\` (backslash itself)
- \` (backtick)
- \* (asterisk)
- \_ (underscore)
- \{ \} (curly braces)
- \[ \] (square brackets)
- \( \) (parentheses)
- \# (hash mark)
- \+ (plus sign)
- \- (minus sign or hyphen)
- \. (dot)
- \! (exclamation mark)
### Examples
1. **Backslash (`\\`)**
To display a backslash:
Input: `\\`
Output: `\\`
2. **Underscore (`_`)**
To prevent Markdown from formatting text as italic (using underscores):
Input: `\_italic\_`
Output: `_italic_`
3. **Hash Mark (`#`)**
To prevent a hash mark from being interpreted as a heading:
Input: `\# This is not a heading`
Output: `# This is not a heading`
4. **Multiple Spaces**
By default, multiple spaces are collapsed into a single space in Markdown. To display multiple spaces, escape each space:
Input: `keep the social \ \ \ distance`
Output: `keep the social distance` (three spaces between "social" and "distance")
### Reference
For further information on escaping characters in Markdown, you can refer to the guide at: [Markdown Guide: Escaping Characters](https://github.com/mattcone/markdown-guide/blob/master/_basic-syntax/escaping-characters.md)