Multi-Paragraph List items format incorrectly

Testing version: 992

What were you doing:

I was attempting to write an ordered list with multiple paragraphs in each list item.

What feature did you use: CommonMark’s multiple paragraph list creation.

What happened:

I entered “1. This is the first item, first paragraph”, and hit [enter]. The first list item rendered properly indented, and the "2. " header was automatically inserted.

I hit [enter] to cancel the item, and [enter] again to insert a line and create a new paragraph. this unindented the cursor as expected.

I then hit [space] to begin indenting the new paragraph of list item #1. On the first press of [space], the cursor jumped to proper indentation. This was surprising in a way, because CommonMark wants the text to align, making me thing I’d need to hit [space] 3 times (i.e. 1 space for each character of "1. ")

However, when I started typing, the indentation immediately removed itself and I was typing a regular paragraph again.

When I press [space] three times on the line, the first [space] causes the cursor to indent, and then two more spaces appear on the line. Then I can continue typing within the same #1 list item. And when I hit enter at the end of that line, sure enough, the list resumes with the "2. " header being automatically created.

What did you expect to happen:

When I saw the cursor auto indent on the first space, I expected that I would be able to continue the list item immediately (i.e. the first [space] automatically added space characters to align the text behind the scenes).

Alternatively, although it’s less friendly, I am fine with manually typing multiple [space] characters, but I’d like the rendering of the list item to not include the additional spaces, so that all paragraphs within the list item are properly aligned.

1 Like

Hi Ryan,

you are correct, indenting new paragraphs with spaces is not well supported at the moment, but adding multi-line paragraphs to a list item is easier than doing that:

  1. start a list and write something
  2. hit :leftwards_arrow_with_hook: (a new list item will be created)
  3. hit ⌫
  4. write on your new paragraph, it should be indented to match the previous list item

Let me know if this helps :slight_smile:


Hi Matteo,

What you describe definitely works, but because that is not the behavior I was describing, I’m concerned that my initial report was unclear.

My goal is to have an empty line between two paragraphs within the same list item. Something like:

  1. This is the start of list item 1.

    This is also part of list item 1.

  2. This is list item 2.

My understanding is that this should be possible via CommonMark, by inserting the spaces as described at the start of the new paragraph (aligning it with the old). And, in fact, when I do type the correct number of spaces in, Panda recognizes it as a part of the same list item (i.e. it displays the next number when I hit enter).

The bug is that I have to manually type the exact number of spaces, and all but the first space are still rendered on the line.