Search code examples
githubmarkdowngithub-flavored-markdown

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


The GitHub markdown code:

1. First item
* subitem
1. Second item

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

enter image description here

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:

enter image description here


Related questions:

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

Solution

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

    1. First item
        * subitem
    2. Second item