unicorn70
V2EX  ›  问与答

Github.iogithub.com 对同一个 md 文件有不同的解析怎么办?

  •  
  •   unicorn70 · May 22, 2014 · 3965 views
    This topic created in 4407 days ago, the information mentioned may be changed or developed.
    主要是有序列表的基数,.com里即使有换段落,计数也会继续,.io里就不会。
    例子:
    https://github.com/imrickysu/imrickysu.github.io/blob/master/_posts/2014-05-15-us-visa-dropoff-citic-flow.markdown
    http://imrickysu.github.io/travel/2015/05/15/us-visa-dropoff-citic-flow/

    有办法让两个地方显示一样吗?大家在对list item做详细描述的时候用什么格式?

    还是应该联系github让他们改bug?
    3 replies    2014-05-22 23:08:59 +08:00
    hahastudio
        1
    hahastudio  
       May 22, 2014
    大概是类似于这个问题
    Table not render when use Redcarpet in Jekyll GitHub Pages?
    http://stackoverflow.com/questions/16099153/table-not-render-when-use-redcarpet-in-jekyll-github-pages


    看你好像用的是kramdown,jekyll的文档部分
    http://jekyllrb.com/docs/configuration/#kramdown
    提示你应该再_config.yml里添加
    kramdown:
    input: GFM

    都是我猜的,管不管用另说
    Andor_Chen
        2
    Andor_Chen  
       May 22, 2014
    各种 parser 有差异,很正常,只要你不为难 parser,得到的结果就是一样的。

    请严格按照 Markdown 的句法说明:

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab。
    unicorn70
        3
    unicorn70  
    OP
       May 22, 2014
    多谢两位。

    试了添加kramdown的GFM属性,不起作用,但是还是多谢提醒,我还是希望用GFM的。

    然后把空格的indent从两个空格改成4个空格就OK了:)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3348 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 11:43 · PVG 19:43 · LAX 04:43 · JFK 07:43
    ♥ Do have faith in what you're doing.