H1h23. List 3.1 ordered listNumber +. + Space, the following code:
1. 项目1 2. 项目2 3. 项目3
The effect is:
1. Item 1
2. Item 2
3. Item 3
3.2 Unordered ListStart with a * and a space, the following code:
* 项目1* 项目2* 项目3
The effect is:
* Item 1
* Item 2
* Item 3
3.3 Sub-items indicate:The sub-item Indents one tab and adds * and spaces to indicate the following code:
* 项目1 * 子项目1 * 子项目2* 项目2 * 子项目1
The effect is:
* Item 1
* Sub-item 1
* Sub-item 2
* Item 2
* Sub-item 1
4. Code blockWith "' and" ' contains, the following code:
def hello(): print‘Hello World!‘
The effect is:
def hello(): print‘Hello World!‘
GFM expands the Markdown code block feature by adding a language name after the first "' above" to make different languages show different code highlighting styles, the following code:
publicstaticvoidmain(String[] args){ System.out.println("Hello World!");}
The effect is:
publicstaticvoidmain(String[] args){ System.out.println("Hello World!");}
The following code:
def hello(): print‘Hello World!‘
The effect is:
def hello(): print‘Hello World!‘
5. FormsThe standard Markdown does not support tables, but GFM can, the table head an empty line to --- be delimited as a table header, | separated by columns, the following code:
表头1|表头2---|---单元格1|单元格2单元格3|单元格4
The effect is:
| Table Header 1 |
Table Header 2 |
| Cell 1 |
Cell 2 |
| Cell 3 |
Cell 4 |
You can also determine the alignment direction of a cell by adding it in the header delimiter : , the following code:
表头1|表头2|表头3:--|:--:|--:左1|中1|右1左2|中2|右2
The effect is:
| Table Header 1 |
Table Header 2 |
Table Header 3 |
| Left 1 |
Medium 1 |
Right 1 |
| Left 2 |
Medium 2 |
Right 2 |
6. Special character escapesIf you need to use special characters in the body, you can use it \ to escape
- Email: [Email protected]
- Good luck!
Markdown Study Manual