Bug 466377 - Created .md document not recognized as such in Okular document preview (Mimetype not assigned via extension?)
Summary: Created .md document not recognized as such in Okular document preview (Mimet...
Status: RESOLVED DUPLICATE of bug 384972
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.12.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-24 22:09 UTC by Henning
Modified: 2023-04-06 20:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***