That does help with custom post types as I added a new one and used the code to register it for markdown module.
But unfortunately, the “Portfolio” section comes with my theme “Latte”, so it’s not as easy as manually added cpts. I can see the cpt with a plugin listed as (name: portfolios, singular_name: portfolio) but neither names work when I use them in the code.
The difference between a cpt and portfolio was when I added a cpt, markdown didn’t work on preview and published post either, and it did work after registering the cpt, but markdown works on preview for portfolio but not on a published one, and it doesn’t work after registering portfolio
either.