WildCat
V2EX  ›  问与答

Markdown 有没有办法在列表(*)内使用多行代码(```)?

  •  
  •   WildCat · Sep 20, 2014 · 5318 views
    This topic created in 4433 days ago, the information mentioned may be changed or developed.
    在使用Ghost写博客,请问这种需求用Markdown能实现吗?
    6 replies  •  2014-09-21 09:58:27 +08:00
    Andor_Chen
    Andor_Chen
    Sep 20, 2014
    1
    试一下就知道了。

    * Item one

    ```ruby
    def hello
    puts 'hello'
    end
    ````

    * Item Two
    Andor_Chen
    Andor_Chen
    Sep 20, 2014❤️1
    2
    哇,空格全没了。

    * 后面加3个空格,``` 块之前都加4个空格。试试看。
    learnshare
    learnshare
    Sep 20, 2014❤️1
    3
    这个需求是不合理的。在一个段落中添加另一个段落,是不合逻辑的吧
    yangg
    yangg
    Sep 20, 2014 via iPad❤️1
    4
    2L正确,代码块加一级缩进就可以了
    uuair
    uuair
    Sep 20, 2014❤️1
    5
    跟上一行空一行
    然后代码前有一个一级缩进,就是tab一个,完了就ok了。
    WildCat
    WildCat
    OP
    Sep 21, 2014
    6
    @Andor_Chen
    还是不行 能贴个gist吗?谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2877 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:24 · PVG 13:24 · LAX 21:24 · JFK 00:24
    ♥ Do have faith in what you're doing.