Thanks for the help with that. I had that working well for the base case (starting a list), but starting a sub-list needed a bit of help.
Based on that, had a couple of questions, and another request to make sure my reading of the specification is correct or not.
Item 1: Does the specification need more examples?
When testing, I easily hit the case for a list where this happens. But it wasn’t until I created a sublist cases that I was able to figure out that sublists have a problem. While I can see that part of that is because of how I implemented my parser, would it be useful to add cases of sublists with (a) and (b), then (a) not (b), then (b) not (a) for comparison? I found that comparison very helpful.
Item 2: What is “start number”?
I tried a couple of things with this, and just have one question: what is “start number”?
If the list item is ordered, then it is also assigned a start number, based on the ordered list marker.
if the list item is ordered, the start number must be 1.
From the reference implementation, it appears that “1” is a string. If I use a “start number” of “01”, it is not recognized the same as “1”.
Is this intentional? If so, would a slight change to the specification be appropriate. Something like “the start number must be the character
Item 3: Example 282
I got everything else working, but then I had problems with this example:
This is my reading… please correct me if I am wrong.
In the Markdown, the third line should start a new list. This happens because the list marker has been changed from
(. Following through with the rest of the rules, the rules discussed in this thread come into play, as
bar opens a paragraph, and by the time we get to the third line, it is still open.
When the first list item in a list interrupts a paragraph—that is, when it starts on a line that would otherwise count as paragraph continuation text
Unless I am misunderstanding some information from above, the above information comes into play.
Part a) says that the lines must not begin with a blank. Check. It starts with
baz. Part b) says that the start number must be 1. There is my problem. When I get to that point, in my head and in code,
1, and that fails, hence it is continuation of the
bar line, not a list start.
Did I read something wrong in this? (again?).