Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 357
user Avatar asked Jul 14 '17 23:07

user


People also ask

How do you break a line in markdown?

To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return. This is the first line.

How do you insert a line in markdown?

In a Markdown file or widget, enter two spaces before the line break to begin a new paragraph, or enter two line breaks consecutively to begin a new paragraph.

How to add line break in Markdown content?

Another way is to add two or more spaces to add line break in markdown content There are multiple ways to add a blank line in markdown content in bitbucket issues or comments. First way, using <br> html tag inside markdonw content. Second way, use two spaces with entering or enter keystroke in markdown content adds link break.

How to add backticks to a Markdown code block?

The text within the backticks will not be formatted. You can also press the Command + E (Mac) or Ctrl + E (Windows/Linux) keyboard shortcut to insert the backticks for a code block within a line of Markdown. Use `git status` to list all new or modified files that haven't yet been committed.

Is there a way to make a list paragraph have no spacing?

By default, Word applies the List Paragraph style when you apply bullet or numbering formatting to text, so you could modify List Paragraph so that it has no spacing before or after. Was this reply helpful? Sorry this didn't help.

What is a line break in HTML?

The line break is a new blank line added to generated HTML as well as render new line on webpage. How does line break add to markdown content? There are multiple ways to add blank lines to markdown content.


1 Answers

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

1. First item
    * subitem
2. Second item
like image 99
Joao Delgado Avatar answered Oct 03 '22 20:10

Joao Delgado