The implementation of Markdown in different software are always different here or there.
To testify the implementation of hexo, syntax page of Mou is pasted in here for comparison.
In summary, only inline image is unavailable.
PS:
- spacing can add indent; and code block & quote wouldn’t indent automatically.
soindent.sh
is used - Could add spacing manually by
#半角的不断行的空白格
(it works in header, too) <br/>
as line break
Bug
- 有时候ordered list序号大于等于10,缩进会失效。
- 目录不能正常显示,如vim笔记.md
Mou
Overview
Mou, the missing Markdown editor for web developers.
Syntax
Strong and Emphasize
strong or strong ( Cmd + B )
emphasize or emphasize ( Cmd + I )
Sometimes I want a lot of text to be bold.
Like, seriously, a LOT of text
Blockquotes
Right angle brackets > are used for block quotes.
Links and Email
An email example@example.com link.
Simple inline link http://chenluois.com, another inline link Smaller, one more inline link with title Resize.
A reference style link. Input id, then anywhere in the doc, define the link with corresponding id:
Titles ( or called tool tips ) in the links are optional.
Images
An inline image , title is optional.
A reference style image.
Inline code and Block code
Inline code are surround by backtick
key. To create a block code:
Indent each line by at least 1 tab, or 4 spaces.
var Mou = exactlyTheAppIwant;
Ordered Lists
Ordered lists are created using “1.” + Space:
- Ordered list item
- Ordered list item
- Ordered list item
Unordered Lists
Unordered list are created using “*” + Space:
- Unordered list item
- Unordered list item
- Unordered list item
Or using “-” + Space:
- Unordered list item
- Unordered list item
- Unordered list item
Hard Linebreak
End a line with two or more spaces will create a hard linebreak, called <br />
in HTML. ( Control + Return )
Above line ended with 2 spaces.
Horizontal Rules
Three or more asterisks or dashes:
Headers
Setext-style:
This is H1
This is H2
atx-style:
This is H1
This is H2
This is H3
This is H4
This is H5
This is H6
Extra Syntax
Footnotes
Footnotes work mostly like reference-style links. A footnote is made of two things: a marker in the text that will become a superscript number; a footnote definition that will be placed in a list of footnotes at the end of the document. A footnote looks like this:
That’s some text with a footnote.[1]
Strikethrough
Wrap with 2 tilde characters:
Strikethrough
Fenced Code Blocks
Start with a line containing 3 or more backticks, and ends with the first line with the same number of backticks:
|
|
Tables
A simple table looks like this:
First Header | Second Header | Third Header |
---|---|---|
Content Cell | Content Cell | Content Cell |
Content Cell | Content Cell | Content Cell |
If you wish, you can add a leading and tailing pipe to each line of the table:
First Header | Second Header | Third Header |
---|---|---|
Content Cell | Content Cell | Content Cell |
Content Cell | Content Cell | Content Cell |
Specify alignment for each column by adding colons to separator lines:
First Header | Second Header | Third Header |
---|---|---|
Left | Center | Right |
Left | Center | Right |
More test for hexo-renderer-markdown-it
- hexo-renderer-markdown-it uses plugins such as markdown-it-sup to implement superscript.
- all plugins
- to use a plugin you need
- npm i plugin-name --save
- add plugin-name into
_config.yml
inplugins:
part of markdown-it config
example
- superscript:
29^th^
-> 29th - subscript:
H~2~O
-> H2O ==highlight==
-> highlight++inserted++
-> inserted- abbrevation
The HTML specification
is maintained by the W3C
And that’s the footnote. ↩