Markdownify rendering invalid output

In some rare cases it ommits first <p> but closes it with </p>

if you have variable like this:

{{ $var := "Paragraph1\n\n* list item1" }}

when you do {{ $var | markdownify }} the first <p> is missing

code looks like this: Paragraph1</p> <ul><li>list item1</li></ul>

if you have two paragraphs it works

{{ $var := "Paragraph1\n\nParagraph 2\n\n* list item1" }}

That sounds like a bug that should be reported.