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

[亡魂溺海] 提交于 2020-01-12 14:33:31

问题


The GitHub markdown code:

1. First item
* subitem
1. Second item

Generates a big space between the First, Second and the subitem:

How to make the subitem close to the first item, instead of exactly on the middle of them?

This is a Photoshop I did to illustrate the correct output:


Related questions:

  1. Multi paragraph list items, OR preventing numbered list auto formatting
  2. Markdown: Problems with numbered list paragraphs containing code element

回答1:


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

1. First item
    * subitem
2. Second item



回答2:


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.



来源:https://stackoverflow.com/questions/45113083/how-to-remove-extra-line-space-on-github-markdown-bullets-lists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!