I know how to start a numbered list at a number greater than 9. I know how to create a multi-lined list element. But I haven't found a way to do both at the same time. I've also tested this on GitHub and it behaves the same way as StackOverflow*:
item
item
item
item
item
This is some typescript code:
function fn(a: string) {
console.log(a);
}
item
This line is outside of any list
item
item
item
item
item
item
item
item
This line is outside of any list.
item
item
item
item
item
1. item
1. item
item
1. item
1. item
```ts
This is some typescript code:
function fn(a: string) {
console.log(a);
}
```
1. item
This line is outside of any list
6. item
item
1. item
1. item
item
1. item
1. item
item
This line is outside of any list.
11. item
item
1. item
item
1. item
item
How do I get bullet point 11.
and those that follow to render correctly?
*: With one exception. StackOverflow lacks syntax highlighting on the code block, which I believe is a bug. But that has nothing to do with this post.
Indentation is significant and this is described in the rules that define list items in the CommonMark spec (v0.30):
Basic case. 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. The type of the list item (bullet or ordered) is determined by the type of its list marker. If the list item is ordered, then it is also assigned a start number, based on the ordered list marker.
In your example, the item
following ordered list item 11 is not indented enough to be considered as child content of the list item, so it is parsed as a new paragraph:
Code:
This line is outside of any list.
11. item
item is now child content
1. item
item
1. item
item
Rendered:
This line is outside of any list.
item <-
item
item
item
item
By adding an additional space, the item will be indented enough to be parsed as child content of the list item and the following list items will continue as part of the same list (that is no longer broken by a paragraph):
Code:
This line is outside of any list.
11. item
item is now child content
1. item
item
1. item
item
Rendered:
This line is outside of any list.
item
item is now child content
item
item
item
item