Bug 466377

Summary: Created .md document not recognized as such in Okular document preview (Mimetype not assigned via extension?)
Product: [Applications] kate Reporter: Henning <boredsquirrel>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: waqar.17a
Priority: NOR    
Version: 22.12.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Henning 2023-02-24 22:09:07 UTC
SUMMARY
I use Kate (rpm version now, as flatpak doesnt work view preview) together with the preview plugin using Okular. 
When creating a .md file manually, the document preview plugin doesnt render it as markdown, probably because the mimetype of the generated document isnt adapted to the file extension. This may also be a problem with other mimetypes.


STEPS TO REPRODUCE
1. Add the Preview Plugin to Kate and enable the view
2. Create a new document, save it as document.md
3. write some markdown syntax like "## header"
4. reload the document preview

OBSERVED RESULT
The mimetype seems to be incorrect. The preview plugin works normally on files created through Dolphin through templates or by creating a text file and naming it "document.md" manually

EXPECTED RESULT
Kates created documents should inherit the mimetype from their extension. I guess

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.13-200.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 Henning 2023-03-13 13:23:49 UTC
It seems all files newly created by Kate and saved as filename.extension dont inherit the correct mimetype.
Comment 2 Waqar Ahmed 2023-04-06 20:16:39 UTC

*** This bug has been marked as a duplicate of bug 384972 ***