V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
unicorn70
V2EX  ›  问与答

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

  •  
  •   unicorn70 · 2014-05-22 22:22:27 +08:00 · 3049 次点击
    这是一个创建于 3598 天前的主题,其中的信息可能已经有所发展或是发生改变。
    主要是有序列表的基数,.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 条回复    2014-05-22 23:08:59 +08:00
    hahastudio
        1
    hahastudio  
       2014-05-22 22:40:47 +08:00
    大概是类似于这个问题
    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  
       2014-05-22 23:03:37 +08:00
    各种 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
       2014-05-22 23:08:59 +08:00
    多谢两位。

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

    然后把空格的indent从两个空格改成4个空格就OK了:)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2894 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:54 · PVG 21:54 · LAX 06:54 · JFK 09:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.