1

TEST 1:

1)
This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. 
2)
This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. 

Renders as:

1) This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. 2) This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text.

TEST 2:

1) This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. 
2) This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. 

Renders as:

  1. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text. This is my first piece of text.
  2. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text. This is my second piece of text.

The above is just for testing the formatting. The TEST 1 is clearly wrong, or is Markdown syntax that hard (to write)?

4

1 Answer 1

6

The formatting of TEST 1 is within specifications. It is not the mark down that should generate a (numbered) list. Taken from the CommonMark specification for list items

If a sequence of lines Ls constitute a sequence of blocks Bs starting with a character other than a space or tab, and M is a list marker of width W followed by 1 ≤ N ≤ 4 spaces of indentation, then the result of prepending M and the following spaces to the first line of Ls*, and indenting subsequent lines of Ls by W + N spaces, is a list item with Bs as its contents.

And what constitutes a List:

A list is a sequence of one or more list items of the same type.

So the 1. is the first list item in a new list. The next line doesn't have a list marker, and it is therefore not a list item. The list ends. Instead a simple paragraph is rendered.

This behavior is similar to what can be observed on the CommonMark playground

shows dingus markdown on the left and rendered output on the right

So, it might look weird for any definition of weird but it works as specified.

3

Not the answer you're looking for? Browse other questions tagged .