Okular not recognising local markdown files

I have used Okular in Manjaro (KDE Plasma edition) to view my markdown files (.md) okay in the past but I have noticed since I recently installed Manjaro KDE-Plasma on a new PC it is not recognising my markdown files and opens them as plain text. When I browse to network shares in Dolphin and open my markdown files from there they are recognised as markdown, and Okular displays them correctly rendered.

I have checked the files using file --mime-type atop.md and it reports it is text/plain

Using mimetype atop.md reports correctly that it is text/markdown

I check the /etc/mime-types list and find this entry

text/markdown                                   markdown md

Okular version is 20.12.0, Manjaro was updated just yesterday and is now reported as up to date, I’m not entirely sure if this was working before the last update as I only installed this system a few days ago.

I have also booted up the machine using the USB stick from the installer ISO (manjaro-kde-20.2-201207-linux59.iso) , this opens up local .md files okay and rendered them correctly in Okular (Okular 1.11.3). The command file --mime-type atop.md shows the file type as text/plain on this system as well.

Both systems show the file type (from Dolphin file manager) of the local atop.md file to be of type ‘Markdown document’ and contents ‘plain text document’

So it seems Okular correctly recognises markdown files from the network, but not local markdown files. I have tested using the same file in all scenarios. Does anyone have any idea why this might be and how I can fix it?

I can confirm this. Just updated to 5.20.4 and Ocular is not formatting markdown.

Nothing to add except that I am also having this problem.

EDIT: Well, one thing to add. I tried using the downgrade package to rollback to a previous version of Okular. So now I am using 20.08.3, and it renders my markdown files without issue. Obviously a temporary fix, but until a new version of the Okular package comes out, this will probably be on my ignore list.

There is a bug report in the KDE bug tracker about this behavior:

According to the report the bug has been fixed in the most recent version, which will eventually hit the Stable branch of Manjaro.