How to remove extra line space on GitHub markdown bullets/lists?

前端 未结 3 1510
自闭症患者
自闭症患者 2021-02-19 13:45

The GitHub markdown code:

1. First item
* subitem
1. Second item

Generates a big space between the First, Second and

相关标签:
3条回答
  • 2021-02-19 14:01

    You cannot do this going from a primary to secondary item. It is possible from a secondary to tertiary list, however. This is due to GitHub's styling of the markdown, not an inherent issue with the markdown itself.

    See this document for details on what is possible regarding different layout styles.

    0 讨论(0)
  • 2021-02-19 14:06

    An admittably "hacky" but still working solution:

    1. Choose any character from here.
    2. Copy it and paste it as bullet point:
    1. First item  [< two spaces for the linebreak]
    ◦ subitem1  [< two spaces for the linebreak]
    ◦ subitem2
    2. Second item
    
    1. Don't forget the two spaces for the linebreak.
    0 讨论(0)
  • 2021-02-19 14:19

    You need to indent the sublist with at least 4 spaces:

    1. First item
        * subitem
    2. Second item
    
    0 讨论(0)
提交回复
热议问题