syntax.md 7.9 KB

h1

h1

h2

h2

h3

h4

h5
h6

#h1

##h2

###h3

####h4

#####h5

######h6

测试一

测试二

测试三

a/b c-d

Horizontal Line




List

  • ul

    • ul
    • ul
  • ul

    • ul
    • ul
  • ul

    • ul
    • ul
  • ul

    • ul
    • ul
  • ul

    • ul
      • ul
  1. ol

    1. ol
    2. ol
  2. ol

    1. ol
      1. ol

Text Formatting

bold

bold

italic

italic

inline code

blockquote

Combinations

first

second

third blockquote

something

something

something

something

something

something

something

something

something

something

blockquote

blockquote

blockquote

Link

link with inline URL

link with index

named link

some-url

some-url

parentheses in URL

escaped parentheses in URL

[email protected]

https://github.com/simov/markdown-viewer

https://github.com/simov/markdown-viewer

Image

named-image

2

2

3

named-image

Code Block

code block using indentation
fenced code block using backtick
fenced code block using tilde

HTML

HTML tags

Details/Summary

Click to Expand ```js var code = 'block' ``` ### Inner Header [link](https://github.com/simov/markdown-viewer)

Definition List

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

KBD

the kbd tag

Supscript/subscript

  • 19th
  • H2O

GFM

Table

table col col col
default align left centered align right
default left align left left something centered something align right
default align left centered align right

Strikethrough

strikethrough

something

something

something

something

something

something

something

something

something

something

Task List

  • task
  • task

Extras

Escapes

HTML tags

\ ` * _ { } # + - . !

[ mathjax ]

( mathjax )

`\(`

```
fenced code block
```

Mention

@simov

Emoji

  • shortname: :wave: :alien:
  • unicode: 👋 👽
  • ascii: :D :/

Footnotes

Something something^named

And something else[^1], and a link^2

[^1]: This reference footnote contains a paragraph...

* ...and a list

Syntax Highlighting

var some = new actionscript();
ServerName apacheconf
<asp:Label runat="server" id="aspnet"></asp:Label>
$some = "bash";
Dim basic As Integer
set some="batch"
char some = "c";
some = "coffeescript"
char some = "cpp";
string some = "csharp";
#some { content: 'css'; }
var some = "dart";
MAINTAINER docker
module(erlang).
type go string
haskell :: Str -> String
<p id="some">html</p>
public static final void main java();
let some = 'javascript';
const some = 'js';
{"some": "json"}
function({"some": "jsonp"})
local some = "lua"
check: makefile
`some` **markdown**
<p>some <strong>markup</strong></p>
server_name nginx;
char some = "objectivec";
$some = "perl";
$some = "php";
some('prolog', 1972)
some = 'python'
some = "ruby"
let some = 'rust';
@include sass;
(define some 'scheme')
@include scss;
'some smalltalk'
select * from `language` where `name` = 'sql';
var some = "swift"
var some: string = "typescript";
<some name="xml"></some>
- language: yaml

MathJax

Delimiters

Delimiter Format Expression Result Support
No delimiters str \sqrt{3x-1}+(1+x)^2 \sqrt{3x-1}+(1+x)^2 no
Bracket without backslash [str] [\sqrt{3x-1}+(1+x)^2] [\sqrt{3x-1}+(1+x)^2] no
Single backslash with bracket \[str\] \[\sqrt{3x-1}+(1+x)^2\] [\sqrt{3x-1}+(1+x)^2] yes
Double backslash with bracket \\[str\\] \\[\sqrt{3x-1}+(1+x)^2\\] \[\sqrt{3x-1}+(1+x)^2\] no
Parentheses without backslash (str) (\sqrt{3x-1}+(1+x)^2) (\sqrt{3x-1}+(1+x)^2) no
Single backslash with parentheses \(str\) \(\sqrt{3x-1}+(1+x)^2\) (\sqrt{3x-1}+(1+x)^2) yes
Double backslash with parentheses \\(str\\) \\(\sqrt{3x-1}+(1+x)^2\\) \(\sqrt{3x-1}+(1+x)^2\) no
Single dollar sign $str$ $\sqrt{3x-1}+(1+x)^2$ $\sqrt{3x-1}+(1+x)^2$ yes
Double dollar sign $$str$$ $$\sqrt{3x-1}+(1+x)^2$$ $$\sqrt{3x-1}+(1+x)^2$$ yes

Markdown

Expressions containing underscore _:

\( single line \)

\(x_i = x_\gamma\) (xi = x\gamma)

\( multiline \)

\(
x_i = x_\gamma
\)

( xi = x\gamma )


\[ single line \]

\[x_i = x_\gamma\] [xi = x\gamma]

\[ multiline \]

\[
x_i = x_\gamma
\]

[ xi = x\gamma ]


$ single line $

$x_i = x_\gamma$ $xi = x\gamma$

$ multiline $

Not supported!

$
x_i = x_\gamma
$

$ xi = x\gamma $


$$ single line $$

$$x_i = x_\gamma$$ $$xi = x\gamma$$

$$ multiline $$

$$
x_i = x_\gamma
$$

$$ xi = x\gamma $$


\begin{} multiline \end{}

\begin{align}
x_i = x_\gamma
\end{align}

\begin{align} xi = x\gamma \end{align}

HTML

<, > and & symbols

  • \(x<y\) (x<y)
  • \(x>y\) (x>y)
  • \(x&a\) (x&a)

Money

\$6.20 and \$0.5

$4.40


Quirks

  1. item 1

    code block
    
  2. item 2

  3. item 3

Nested tables in lists

case 0: a table at indentation level 0, after a paragraph (at level 0) -- this should render the table not-indented

A B
1 2
  • case 1: a table at indentation level 1, after a list item at level 1 -- this should render the table indented once

    A B
    1 2
    • case 2: a table at indentation level 2, after a list item at level 2 -- this should render the table indented twice

      A B
      1 2

case 3: a table at indentation level 1, after a a paragraph (at level 0) -- this should render the raw text into a code block

|A|B|
|---|---|
|1|2|