Some lists are not rendered as expected

123 is rendered as one unordered list, just with spacing. ab and c are two lists, as you added a non-list element.

Here’s your markdown:

- 1
- 2

- 3

vs.

- a
- b

foo

- c

Note the raw HTML:

<div class="cooked">
    <ul>
        <li>
            <p>1</p>
        </li>
        <li>
            <p>2</p>
        </li>
        <li>
            <p>3</p>
        </li>
    </ul>
    <p>vs.</p>
    <ul>
        <li>a</li>
        <li>b</li>
    </ul>
    <p>foo</p>
    <ul>
        <li>c</li>
    </ul>
</div>

So everything appears to be working as I’d expect. What did you expect to happen?