Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown #53

Open
uniquejava opened this issue Jun 23, 2016 · 1 comment
Open

markdown #53

uniquejava opened this issue Jun 23, 2016 · 1 comment

Comments

@uniquejava
Copy link
Owner

uniquejava commented Jun 23, 2016

markdown概述

常用

我发现我没有写的必要了, 把MWeb > Actions菜单中的全部功能执行一遍就行了, 而且每个都有快捷键. 100个👍🏻

表现

完全一样的markdown, 看看它们的差异.

hexo需要修正
github还不错
MWeb 完美

总结

  1. Code block前后都必须加空白行
  2. OL前后加空白行
  3. OL中间不能出现空白行, 需要把每个空白行替换成一个>字符.
  4. OL的第一行以TAB>开始, 后续的行不必以TAB>开始.
  5. hexo很严格, 空白行必须完全空白,不能有任何的space/tab.
  6. hexo的block quote必须以>空格开始, 空格不能少.

github/mweb版

hexo 请绕到后面.

Ordered List

OL前面代空白行

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

OL前面不代空白行

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

Blockquote中插入OL

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

Blockquote中插入OL(附加一些文字)

text here

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

text here

End.

Nested Ordered List

  1. This is line one

  2. OL中插入code block需要tab缩进, 并且前后必须用空白行隔离

    func test(){
        print("ident with one tab")
    }
  3. 二级嵌套

    • hello

    • 二级OL中插入code block需要用两个tab缩进

      func test(){
          print("ident with 2 tabs")
      }
    • ​OL中插入block quote

      Blockquote以TAB>开始
      后续的行不必以TAB>开始
      This line just works

      空白行必须加上>
      Blockquote中可以插入fenced code,但前后必须用带>号的空白行隔离

      func 2TabsBe4Func(){
          print("3 tabs before print")
      }       
      

      another fenced code

      func 2TabsBe4Func(){
          print("3 tabs before print")
      }
      

      二级OL中的blockquote中OL
      使用Tab缩进不行(看起来像个代码块):

      1. item 1
      * item 2
      

      每行都必须加>

      1. item 1
      2. item 2
      3. item 3

      不加的后果:

      1. item 1
      2. item 2
      3. item3

      呃..

  4. End github/mweb

Hexo

Ordered List(hexo)

OL前面代空白行

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

OL前面不代空白行

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

Blockquote中插入OL(hexo不能用*号, 第一行>后面要接上空格)

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

Blockquote中插入OL(附加一些文字)

text here

  1. item mongoose怎么用 #1
  2. item mongoclient怎么用 #2
  3. item jquery怎么用 #3

text here

Hexo end

Nested Ordered List (hexo)

  1. This is line one.

  2. OL中插入code block需要tab缩进, 并且前后必须用空白行隔离

    func test(){
        print("ident with one tab")
    }
  3. 二级嵌套

    • Hexo start

    • 二级OL中插入code block需要用两个tab缩进

      func test(){
          print("ident with 2 tabs")
      }
    • ​OL中插入block quote

      Blockquote以TAB>开始
      后续的行不必以TAB>开始
      This line just works

      空白行必须加上>
      Blockquote中可以插入fenced code,但前后必须用带> 号的空白行隔离

      func 2TabsBe4Func(){
          print("3 tabs before print")
      }       
      

      another fenced code

      func 2TabsBe4Func(){
          print("3 tabs before print")
      }
      

      二级OL中的blockquote中OL
      使用Tab缩进不行(看起来像个代码块):

      1. item 1
      * item 2
      

      每行都必须加>

      1. item 1
      2. item 2
      3. item 3

      不加的后果:

      1. item 1
      2. item 2
      3. item3

      呃..

  4. Hexo end.

源代码

把这段代码放在git osc, github, hexo, mweb中查看不同环境下的差异
TODO

参考

见这里: https://guides.github.com/features/mastering-markdown/
还有这里: https://gist.github.com/clintel/1155906

@uniquejava
Copy link
Owner Author

uniquejava commented Jun 23, 2016

osc的用的不熟悉, 并且我一般都会在mweb中边写边预览.
贴到oschina中后. 规则/效果完全不一样. 有需要再研究

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant