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
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?