Nested enumeration seems to break when parent has more than ten elements preceeding child
flyn-org opened this issue · 2 comments
flyn-org commented
I have been playing with nested enumerations in the demo at https://commonmark.org/help/tutorial/10-nestedLists.html. I found that a nested enumeration does not get rendered properly if its parent has ten or more previous items. Here is an example:
1. x
2. x
3. x
4. x
5. x
6. x
7. x
8. x
9. x
10. x
1. x
This example gets rendered as
1. x
2. x
3. x
4. x
5. x
6. x
7. x
8. x
9. x
10. x
11. x
Notice that item 11 is rendered as a part of the parent list, not as item one in a nested list.
I can fix this like so:
1. x
1. x
1. x
1. x
1. x
1. x
1. x
1. x
1. x
1. x
1. x
Here the numbers get "fixed", and the rendering looks like this:
1. x
2. x
3. x
4. x
5. x
6. x
7. x
8. x
9. x
10. x
1. x
wooorm commented
This is explained at length and tested in the spec. Was there a particular point you found complex there?
flyn-org commented
I see it now. Thank you for the quick response. Not an issue.