How do I either:
Create a numbered list item that has multiple paragraphs (broken with newlines), or
As a workaround, prevent the editor from automatically formatting lists marked with "N." (since it restarts at 1 no matter what number I enter)?
Warning: this answer documents how StackExchange parsed before it adopted CommonMark, which does not interpret/parse these examples in the same way.
Insert a blank line after the list item's first paragraph and before the start of your second paragraph. Make sure to indent the second line containing text with at least one space to ensure that it is indented as part of the list.
Code (StackExchange's pre-2021 Markdown dialect):
1. Option one
Second paragraph
2. Option two
Second paragraph
Result:
Option one
Second paragraph
Option two
Second paragraph
Of course, the extra space is optional. If you don't want that, you can just use two spaces at the end of a line in order to force a line break:
Code (StackExchange's pre-2021 Markdown dialect):
1. Option one
Second paragraph
2. Option two
Second paragraph
Result:
Option one
Second paragraphOption two
Second paragraph
Naturally, the extra line between list items is also optional, but that works the same way as a simple list—just don't separate the items with an empty line in your Markdown.
Easy: escape the list item with a backslash.
Markdown:
7\. Item one
196\. Item two
Preview:
7. Item one
196. Item two
Of course, you lose the indentation this way. The only workaround that I know of is to add non-breaking spaces manually ( )—about 5 will suffice.
Like this:
Markdown:
1. first half<br/><br/>second half
1. second item
<br>s look bad on both sides. (Note the difference in spacing between the two answers)
You can also just put a line break + space in the second paragraph:
Markdown:
1. first
second
2. asdf
Output:
first
second
asdf
There is a simple, if unintuitive way to do this. End a line with a backslash or two spaces and the next line will appear on a new line. Unfortunately, StackExchange's Markdown implementation only supports the two space version, but you can see both in action at GitHub here.
* List item
* Indented list item 1\
item 1 line two\
item 1 line three
* Indented list item 2
In case StackExchange supports backslash line breaks sometime in the future, here's what that looks like.
* List item
* Indented list item 1
item 1 line two
item 1 line three
* Indented list item 2
The link mentioned by Cody Gray in comments was quite helpful. Other markdown's like R markdown and Github also follow it so I am just reposting the link. So that no one misses it.
From that post:
Lists: When creating nested lists, you’ll need to indent your nested list items or paragraphs with the right amount of spaces. While one space was enough before, you’ll need to add a few more now, depending on your type of list.
To make a paragraph part of a list item it used to be enough to add one space in front of the paragraph
* this is a list item that goes on herewith CommonMark, the paragraph has to line up with the text of the parent, so we need a few more spaces here:
* this is a list item that goes on here
1. - one-dot-space). Code snippets can also be included in a list item if indented sufficiently.
As a workaround, prevent the editor from automatically formatting lists marked with "N." (since it restarts at 1 no matter what number I enter)?
For this you have to break a list kinda like this.
1. first
0. second
<!-- Put at least two rows before specific number:
- the first line is filled by html comment which can be empty
- the last is just empty row.
A little problem: small padding,
maybe something else what I don't know -->
<!-->
4. fourth
In quote
- first
- second
- fourth
> 1. first
> 0. second
> <!-->
>
> 4. fourth