Hello!
I’m not totally familiar with Python’s (or PHP’s) markdown implementation, but my understanding is that, by default, markdown will not be parsed inside block level HTML elements there.
In general, Deepdwn’s goal is to meet the commonmark spec, where that is not the case. You can read about the way that mixed HTML and markdown are handled here: https://spec.commonmark.org/0.30/#html-block.
I think the spec isn’t especially easy to understand, but you can take a look at the examples below that, that are a bit easier to understand.
That said, Deepdwn limits the HTML elements and attributes that will appear in the preview and exports. That may be an issue for you, depending on your use case.
Hope that helps!