Katex inline math in md vs mmark

I recently fixed an issue in one of my themes related to katex inline math. The issue was that this snippet:

Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$

It rendered incorrectly as block math in
But when I changed the content type to index.mmark, it rendered correctly.

If anyone has seen this before, would you shed some light on what is going on here? Thank you.

If memory serves me right it is recommended to use mmark for KaTex.

I’ve never used it with Blackfriday markdown.

Thanks, that’s good to know. I added a note in there about using mmark.