Skip to content

Latest commit

 

History

History
802 lines (560 loc) · 20.5 KB

demo.md

File metadata and controls

802 lines (560 loc) · 20.5 KB

Test Markdown

[TOC]

二级标题 This is header 2 <xyzabc /> tag

test markdown

三级标题 Same header 3

Some regular text 123456

三级标题 Same header 3

1234567890

三级标题 Same header 3

qwertyuiop

四级标题 This is header 4

asdfghjkl

五级标题 This is header 5

zxcvbnm

六级标题 This is header 6

Last header

Test Render

Basic format

斜体:Emphasis, aka italics, with asterisks 单星号 or underscores 单下划线

加粗:Strong emphasis, aka bold, with asterisks 双星号 or underscores 双下划线

斜体加粗:Combined emphasis with asterisks 双星号 and underscores 单下划线 or 三个星号

删除线(非标准语法):Strikethrough uses two tildes 双波浪线 删除线加行内代码

行内代码:ls -a

高亮(非标准语法):==test 双等号 test==

Test links using [](): https://www.example.com/, http://www.example.com/, test.html, #123456, alert(1), someone@example.com, custom title attr

Test links using [][]: https://www.example.com/, http://www.example.com/, test.html, #123456, alert(1), someone@example.com, custom title attr

Test links using <>: https://www.example.com/, someone@example.com

Test auto link: https://www.example.com/

引用:

我没说过这句话——鲁迅

引用:

The quick brown fox jumps over the lazy dog.

多行带格式引用:

锦瑟

李商隐

锦瑟无端五十弦,一弦一柱思华年。
庄生晓梦迷蝴蝶,望帝春心托杜鹃。
沧海月明珠有泪,蓝田日暖玉生烟。
此情可待成追忆?只是当时已惘然。

ThisLineIsVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongEND

ThisLineIsVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongEND

ThisLineIs VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong END

行内代码:ThisLineIsVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongEND

行内代码:ThisLineIs VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong VeryLongVeryLong END

Test long link: https://www.example.com/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/very/long/END/

  • long lines in list
  • ThisLineIsVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongEND
  • ThisLineIsVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongVeryLongEND
  • end list

Font

一去二三里烟村四五家亭台六七座八九十支花:;、,。?!“”‘’()【】《》

一去二三里烟村四五家亭台六七座八九十支花:;、,。?!“”‘’()【】《》

一去二三里烟村四五家亭台六七座八九十支花:;、,。?!“”‘’()【】《》

一去二三里烟村四五家亭台六七座八九十支花:;、,。?!“”‘’()【】《》

The quick brown fox jumps over the lazy dog 0123456789 :;,.?!"'() [] {}

The quick brown fox jumps over the lazy dog 0123456789 :;,.?!"'() [] {}

The quick brown fox jumps over the lazy dog 0123456789 :;,.?!"'() [] {}

The quick brown fox jumps over the lazy dog 0123456789 :;,.?!"'() [] {}

font weight test

100 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 100;" }

200 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 200;" }

300 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 300;" }

400 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 400;" }

500 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 500;" }

600 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 600;" }

700 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 700;" }

800 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 800;" }

900 我能吞下玻璃而不伤身体 The quick brown fox jumps over the lazy dog {: style="font-weight: 900;" }

Paragraph

苏子曰:“客亦知夫水与月乎?逝者如斯,而未尝往也;盈虚者如彼,而卒莫消长也,盖将自其变者而观之,则天地曾不能以一瞬;自其不变者而观之,则物与我皆无尽也,而又何羡乎?且夫天地之间,物各有主,苟非吾之所有,虽一毫而莫取。惟江上之清风,与山间之明月,耳得之而为声,目遇之而成色,取之无禁,用之不竭,是造物者之无尽藏也,而吾与子之所共适。”

And when this happens, When we allow freedom to ring, when we let it ring from every village and every hamlet, from every state and every city, we will be able to speed up that day when all of God's children, black men and white men, Jews and Gentiles, Protestants and Catholics, will be able to join hands and sing in the words of the old Negro spiritual, "Free at last! free at last! thank God Almighty, we are free at last!"

Table

English Number
one 1
two 2
three 3
four 4

List

Unordered list using -

  • a b c d e f g h i j k 一去二三里 烟村四五家 亭台六七座 八九十支花
  • The quick brown fox jumps over the lazy dog
  • list files: ls -alh
  • uid=0(root) gid=0(root) groups=0(root)

Ordered list using 1., 2., etc.

  1. a b c d e f g h i j k 一去二三里 烟村四五家 亭台六七座 八九十支花
  2. The quick brown fox jumps over the lazy dog
  3. list files: ls -alh
  4. uid=0(root) gid=0(root) groups=0(root)

嵌套无序列表:

  • a b c
  • d e f
    • a b c
    • d e f
      • a b c
      • d e f
      • g h i
    • g h i
  • j k l

嵌套有序列表:

  1. a b c
  2. d e f
    1. a b c
    2. d e f
      1. a b c
      2. d e f
      3. g h i
    3. g h i
  3. j k l

Task list

非标准语法

  • Eat
  • Code
    • HTML
    • CSS
    • JavaScript
  • Sleep

脚注

非标准语法

锦瑟

李商隐

锦瑟1无端2五十弦3,一弦一柱思华年。
庄生晓梦迷蝴蝶4,望帝春心托杜鹃5
沧海月明珠有泪6,蓝田7日暖玉生烟。
此情可待成追忆?只是8当时已惘然。

一去二三里9,烟村四五家。亭台六七座,八九十支花10。The quick brown fox jumps over the lazy dog11. 一去二三里9,烟村四五家。亭台六七座,八九十支花10。The quick brown fox jumps over the lazy dog11. 一去二三里9,烟村四五家。亭台六七座,八九十支花10。The quick brown fox jumps over the lazy dog11. 一去二三里9,烟村四五家。亭台六七座,八九十支花10。The quick brown fox jumps over the lazy dog11. 一去二三里9,烟村四五家。亭台六七座,八九十支花10。The quick brown fox jumps over the lazy dog11.

Test multi line footnote12.

///Footnotes Go Here///

自动 <br> 换行

第一行。 第二行。

警告

type 为 success

!!! success 大吉大利,晚上吃鸡!

type 为 info,无 title

!!! info "" 这是一条普通信息

测试链接 [example.com](https://www.example.com/)

多行文字

type 为 warning

!!! warning Nuclear missile launched!

Weather control device activated!

type 为 danger,手动指定 title

!!! danger "严重错误" CPU 100% 内存 100%

Alignment

我没说过这句话——鲁迅

English Number
one 1

!!! info "" 这是一条普通信息这是一条普通信息这是一条普通信息这是一条普通信息这是一条普通信息这是一条普通信息这是一条普通信息这是一条普通信息

int test(int num);

[TOC]

Images

A 14 x 14 inline image: test-inline2.png{: class="inline" }, and a 512 x 512 inline image: test-inline.png{: class="inline" }

A 198 x 192 image:

test-small.jpg

A 2880 x 1576 image with transparent background:

test-large.png

A 7680 x 4320 (8K) image:

test-large2.png

A 198 x 192 image with caption:

test-small.jpg

A 2880 x 1576 image with transparent background and caption:

test-large.png

A 7680 x 4320 (8K) image with caption:

test-large2.png

Images with long captions:

test-small.jpg

test-large.png

test-large2.png

LaTeX Math

非标准语法

Inline $\rm\LaTeX$: $E = mc^2$, $\lim_{x\rightarrow0} \frac{\sin(x)}{x} = 1$

Block $\rm\LaTeX$:

$$\lim_{x\rightarrow0} \frac{\sin(x)}{x} = 1$$ $$\int\limits_a^b {\frac{d}{{dx}}F\left( x \right)dx} = F\left( b \right) - F\left( a \right)$$ $$s_N = \sqrt {\frac{1}{N}\sum\limits_{i = 1}^N {\left( {x_i - \bar x} \right)^2 } }$$ $$\left\{ \begin{align} \nabla \cdot \mathbf{E} &= \cfrac{\rho}{\varepsilon_0} \\\ \nabla \cdot \mathbf{B} &= 0 \\\ \nabla \times \mathbf{E} &= -\cfrac{\partial \mathbf{B}}{\partial t} \\\ \nabla \times \mathbf{B} &= \mu_0\mathbf{J} + \mu_0\varepsilon_0 \cfrac{\partial \mathbf{E}}{\partial t} \end{align} \right.$$

Comments

The next line is a standard HTML comment which starts with <!-- and will remain in the output.

The next line is a markdown comment which starts with <!--- and will be removed.

Inline markdown comment, will be removed:

------ (<hr> tag)


Code blocks

Code block with ```:

# include <stdio.h>
int main()
{
    printf("Let's try some code.\n");
    printf("this line is very very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong\n");
    printf("this line is very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long\n");

    return 0;
}

Code block with ```text

# comment aabb
# include <stdio.h>
import requests

Code block with ```python

# comment aabb
# include <stdio.h>
import requests

Code block with ```c

# comment aabb
# include <stdio.h>
import requests

Code highlighting test 1

import os
import sys.stdout as out

"""
Author: asdfgh
"""

@abcd.efgh(123, 456.789, "sample string", test=True)
def qwerty(foo, bar="baz"):
    """qwerty function"""
    llll = [123, 456.789, None, "123 \'456\' 789", True]
    while True:
        if foo >= 0 and bar is not None:
            print("%s %r" % (bar, foo))
            print(', '.join(llll))
            foo -= 1

# sample class
# qqq www eee rrr ttt yyy
class Human(object):
    def __init__(self, name=None): # TODO: set user age
        self.name = name # set user name
        self.judge = lambda x: x >= 0

user = Human("Abcd")

try:
    with open('abc.txt', 'w') as f:
        f.write(user.name)
except Exception as e:
    print(type(e), repr(e), dir(e))

Code highlighting test 2

/* 
This is a sample C++ file
*/

#include <iostream>
#define true false

using namespace std;

// A sample class
class Human {
    private double length = 123.456;
    private int age = 0;
    private char name[] = "Hello";

    public void birthday() {
        age++;
        cout << name << endl;
        print("Happy Birthday!");
    }
}

int main() {
    char *_str      = "a normal string";
    wchar_t *L_str  = L"a wide string";
    char16_t *u_str = u"utf-16 string";

    std::cout << _str << std::endl;

    return 0;
}

Test lexers availability

Pygments Languages

txt

<p><a href="https://www.example.com/">txt</a></p>

text

<p><a href="https://www.example.com/">text</a></p>

shell

id -k "fdafe" 32 $(fda id) > ~/shell

bash

id -k "fdafe" 32 $(fda id) > ~/bash

python

# python
import os

os.path.join('a', 'b')

py3

# py3
import os

os.path.join('a', 'b')

c

// c
int main(void)
{
    return 0;
}

cpp

// cpp
int main(void)
{
    return 0;
}

java

public class HelloWorld {
    public static void main(String[] args){
        System.out.println("Hello World!");
    }
}

asm

movl -8(%ebp, %edx, 4), %eax
leal 8(,%eax,4), %eax

md

# md

[abc](https://b.com/)

markdown

# markdown

[abc](https://b.com/)

xml

<note>
    <to>Tove</to>
    <from>Jani</from>
</note>

html

<p><a href="https://www.example.com/">html</a></p>

js

document.getElementById('js')

javascript

document.getElementById('javascript')

json

{
    "k1": true,
    "k2": ["foo"]
}

css

div {
    width: 100%;
}

php

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
</head>
<body>
<p><?php echo "Today is " . date("Y/m/d") . "<br>"; ?></p>
</body>
</html>

html+php

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
</head>
<body>
<p><?php echo "Today is " . date("Y/m/d") . "<br>"; ?></p>
</body>
</html>

sql

SELECT * FROM users; -- sql

mysql

SELECT * FROM users; # mysql

bat

@echo off

echo %bat%

batch

@echo off

echo %batch%

ini

[test]
type = ini

console

root@ubuntu:~# id
uid=0(root) gid=0(root) groups=0(root)
root@ubuntu:~#

shell-session

root@ubuntu:~# id
uid=0(root) gid=0(root) groups=0(root)
root@ubuntu:~#

pycon

>>> a = 'pycon'
>>> print a
pycon
>>> 1 / 0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero

matlab

% matlab
a = xlsread('file1.xlsx', 1, 'B2:B185726')
area_zero = 1;
begin_array = [];

http

GET /robots.txt HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: curl/7.64.1
Accept: */*
HTTP/1.0 404 File not found
Server: SimpleHTTP/0.6 Python/3.10.9
Date: Sun, 01 Jan 2023 12:34:56 GMT
Connection: close
Content-Type: text/html;charset=utf-8
Content-Length: 469

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <title>Error response</title>
    </head>
    <body>
        <h1>Error response</h1>
        <p>Error code: 404</p>
        <p>Message: File not found.</p>
        <p>Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.</p>
    </body>
</html>

hexdump

00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|
00000010  02 00 3e 00 01 00 00 00  c5 48 40 00 00 00 00 00  |..>......H@.....|

diff

--- a.txt
+++ b.txt
@@ -1,3 +1,3 @@
 aaa
-bbb
+bbbb
 ccc

End test

Footnotes

  1. 锦瑟:装饰华美的瑟。瑟:拨弦乐器,通常二十五弦。

  2. 犹何故。怨怪之词。五十弦:这里是托古之词。作者的原意,当也是说锦瑟本应是二十五弦。

  3. 五十弦:这里是托古之词。作者的原意,当也是说锦瑟本应是二十五弦。

  4. “庄生”句:《庄子·齐物论》:“庄周梦为蝴蝶,栩栩然蝴蝶也;自喻适志与!不知周也。俄然觉,则蘧蘧然周也。不知周之梦为蝴蝶与?蝴蝶之梦为周与?”李商隐此引庄周梦蝶故事,以言人生如梦,往事如烟之意。

  5. “望帝”句:《华阳国志·蜀志》:“杜宇称帝,号曰望帝。……其相开明,决玉垒山以除水害,帝遂委以政事,法尧舜禅授之义,遂禅位于开明。帝升西山隐焉。时适二月,子鹃鸟鸣,故蜀人悲子鹃鸟鸣也。”子鹃即杜鹃,又名子规。

  6. 珠有泪:《博物志》:“南海外有鲛人,水居如鱼,不废绩织,其眼泣则能出珠。”

  7. 蓝田:山名,在今陕西,产美玉。

  8. 只是:犹“止是”、“仅是”,有“就是”、“正是”之意。

  9. This is a footnote content. 2 3 4 5

  10. A footnote on the label: !@$*-_+=:;.. ↩ ↩2345

  11. A footnote on the label foo. Test italic 斜体 text, bold 加粗 text. 2 3 4 5

  12. This is first line. "Special" chars: ' " < >

    This is second line. bold 加粗 text.