Skip to content

Latest commit

 

History

History
632 lines (431 loc) · 9.29 KB

syntax.md

File metadata and controls

632 lines (431 loc) · 9.29 KB

h1

h1

h2

h2

h3

h4

h5
h6

#h1

##h2

###h3

####h4

#####h5

######h6

测试一

测试二

测试三

a/b c-d

toc - link hey link a

toc - header 👽 emoji

toc - header code italic bold

1

verylongheaderverylongheaderverylongheaderverylongheaderverylongheader

Horizontal Line







List

  • ul
    • ul
      • ul
  • ul
    • ul
      • ul
  • ul

    • ul
      • ul
  • ul

    • ul
      • ul
  • ul
    • ul
      • ul
  1. ol
  2. ol 1. ol
  1. ol
  2. ol
  3. ol
    1. ol
    2. ol
    3. ol
      1. ol
      2. ol
      3. 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

someone@gmail.com

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

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

Combinations


Image

named-image

2

2

3

named-image


Code Block

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

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
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
  • link, formatting, and tags supported

Line Breaks

Line 1 Line 2 Line 3

Footnotes

Something something1

And something else2, and a link3


HTML

CSS Style

HTML Tags

bold and underline

Details/Summary

Open by Default
  • task
  • task
Click to Expand
var code = 'block'

Inner Header

link

👽

Definition List

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

KBD

the kbd tag

Supscript/subscript

  • 19th
  • H2O

MathML

When a≠0 , there are two solutions to ax2 + bx + c = 0 and they are x = − b ± b2 − 4ac 2a .


Extras

Syntax Highlighting

Syntax Highlighting inside HTML table
var hello = 'hi'
amazing

MathJax

Mermaid

Diagram inside HTML table

          sequenceDiagram
            Alice->>+John: Hello John, how are you?
            Alice->>+John: John, can you hear me?
            John-->>-Alice: Hi Alice, I can hear you!
            John-->>-Alice: I feel great!
        
amazing

Emoji

  • shortcode: 👋 👽
  • unicode: 👋 👽
  • ascii: :D :/
:wave:
something :wave:
  • < 👋
  • < 👋
  • :wave:
  • something :wave:
  • link
  • emoji shortnames like :smile: will be converted to 😄 using EmojiOne images
:smile:
console.log(':smile:')

Escapes

<em>HTML tags</em>

\ ` * _ { } # + - . ! [ ] ( )

`\(`

```
fenced code block
```

Quirks

Code block inside list

  1. item 1
code block
  1. item 2

  2. item 3

Tables inside nested 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|

blank line code block

  1. python 3.7.9:
Some code

Here

Empty table cells

Test
1 Problem
Column 1 Column 2 Column 3
This Is Correct
Rendered Incorrect

h2 before

h1

Problem with spaces as new-line after bold/italics followed by a period

simov/markdown-viewer#124

line 1 **bold follwed by period**.
line 2
line 3 **bold**
line 4
line 5 *italic follwed by period*.
line 6
line 7 *italic*
line 8
line 9 text followed by period.
line 10
line 11 text
line 12

Blank line in code block breaks rendering

simov/markdown-viewer#125

  • First support:
Bold
Underline
InvertColors
ClearAttributes
ResetAllAttributes

Red
IntenseRed
OnRed
OnIntenseRed

line breaks in CJK

simov/markdown-viewer#127

Markdown-Viewer是浏览器上最好的Markdown预览插件,能够对Md文件进行高度定制化的预 览,支持众多选项设置,易于安装,免费开源。

Footnotes

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

  2. This reference footnote contains a paragraph...

    • ...and a list
  3. https://github.com/simov/markdown-viewer