MarkDOwn初识
标题
要创建标题,请在单词或短语前面添加井号 (#) 。# 的数量代表了标题的级别。例如,添加三个 # 表示创建一个三级标题 (
) (例如:### My Header)。
1 2 3 4 5 6 7
| # 1级标题 ## 2级标题 ### 3级标题 #### 四级标题 ##### 五级标题 ###### 六级标题
|
字体
斜体文本
加粗文本
加粗和斜体文本
删除文本
引用文本
列表
有序列表
要创建有序列表,请在每个列表项前添加数字并紧跟一个英文句点。数字不必按数学顺序排列,但是列表应当以数字 1 起始。
一:
- First item
- Second item
- Third item
- Fourth item
二:
1 2 3 4
| 1. First item 1. Second item 2. Third item 3. Fourth item
|
- First item
- Second item
- Third item
- Fourth item
三:
1 2 3 4
| 1. First item 8. Second item 7. Third item 3. Fourth item
|
- First item
- Second item
- Third item
- Fourth item
无序列表
要创建无序列表,请在每个列表项前面添加破折号 (-)、星号 (*) 或加号 (+) 。缩进一个或多个列表项可创建嵌套列表。
1 2 3 4 5 6
| - First item - Second item - Third item - Indented item - Indented item - Fourth item
|
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
复选框列表(CheckBoxList)
1 2 3
| - [ ] List Item 1 unchecked - [x] List Item 2 checked - [X] List Item 3 checked
|
代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| #[derive(Debug)] pub enum State { Start, Transient, Closed, }
impl From<&'a str> for State { fn from(s: &'a str) -> Self { match s { "start" => State::Start, "closed" => State::Closed, _ => unreachable!(), } } }
|
1 2 3 4 5 6 7 8 9 10 11 12
| [ { "title": "apples", "count": [12000, 20000], "description": {"text": "...", "sensitive": false} }, { "title": "oranges", "count": [17500, null], "description": {"text": "...", "sensitive": false} } ]
|
1 2 3 4 5 6 7 8 9 10 11 12
| @requires_authorization def somefunc(param1='', param2=0): r'''A docstring''' if param1 > param2: print 'Gre\'ater' return (param2 - param1 + 1 + 0b10l) or None
class SomeClass: pass
>>> message = '''interpreter ... prompt'''
|
1 2 3 4 5 6 7 8 9 10 11 12 13
| <!DOCTYPE html> <title>Title</title>
<style>body {width: 500px;}</style>
<script type="application/javascript"> function $init() {return true;} </script>
<body> <p checked class="title" id='title'>Title</p> </body>
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| function $initHighlight(block, cls) { try { if (cls.search(/\bno\-highlight\b/) != -1) return process(block, true, 0x0F) + ` class="${cls}"`; } catch (e) { } for (var i = 0 / 2; i < classes.length; i++) { if (checkCondition(classes[i]) === undefined) console.log('undefined'); }
return ( <div> <web-component>{block}</web-component> </div> ) }
export $initHighlight;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| #include <iostream>
int main(int argc, char *argv[]) {
for (auto i = 0; i < 0xFFFF; i++) cout << "Hello, World!" << endl;
char c = '\n'; unordered_map <string, vector<string> > m; m["key"] = "\\\\";
return -2e3 + 12l; }
|
1 2 3 4 5 6 7 8 9 10 11 12
| CREATE TABLE "topic" ( "id" serial NOT NULL PRIMARY KEY, "forum_id" integer NOT NULL, "subject" varchar(255) NOT NULL ); ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
|
1 2 3 4 5 6 7 8 9 10 11 12 13
| #import <UIKit/UIKit.h> #import "Dependency.h"
@protocol WorldDataSource @optional - (NSString*)worldName; @required - (BOOL)allowsToLive; @end
@property (nonatomic, readonly) NSString *title; - (IBAction) show; @end
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
package l2f.gameserver.model;
public abstract class L2Char extends L2Object { public static final Short ERROR = 0x0001;
public void moveTo(int x, int y, int z) { _ai = null; log("Should not be called"); if (1 > 5) { return; } } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| import Foundation
@objc class Person: Entity { var name: String! var age: Int!
init(name: String, age: Int) { }
func description(offset: Int = 0) -> String { return "\(name) is \(age + offset) years old" } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| @font-face { font-family: Chunkfive; src: url('Chunkfive.otf'); }
body, .usertext { color: #F0F0F0; background: #600; font-family: Chunkfive, sans; }
@import url(print.css); @media print { a[href^=http]::after { content: attr(href) } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13
| class Greeter def initialize(name) @name = name.capitalize end
def salute puts "Hello #{@name}!" end end
g = Greeter.new("world") g.salute
|
1 2 3 4 5 6 7 8 9 10 11 12 13
|
BUILDDIR = _build EXTRAS ?= $(BUILDDIR)/extras
.PHONY: main clean
main: @echo "Building main facility..." build_main $(BUILDDIR)
clean: rm -rf $(BUILDDIR)/*
|
1 2 3 4 5 6 7 8 9 10 11 12
| package main
import "fmt"
func main() { ch := make(chan float64) ch <- 1.0e10 x, ok := <- ch defer fmt.Println(`exitting now\`) go println(len("hello world!")) return }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| #!/bin/bash
ACCEPTED_HOSTS="/root/.hag_accepted.conf" BE_VERBOSE=false
if [ "$UID" -ne 0 ] then echo "Superuser rights required" exit 2 fi
genApacheConf(){ echo -e "# Host ${HOME_DIR}$1/$2 :" }
|
1 2 3 4 5 6 7 8 9 10 11 12
| [package] name = "some_name" authors = ["Author"] description = "This is \ a description"
[[lib]] name = ${NAME} default = True auto = no counter = 1_000
|
超链接
1
| 这是一个链接 [百度](https://baidu.com)。
|
这是一个链接 百度。
图片
1
| 
|
