Created attachment 134178 [details] Markdown file for tests SUMMARY Okular uses wrong backend for Markdown files. Issue could be fixed by the reverting this commit: https://invent.kde.org/graphics/okular/-/merge_requests/316/diffs?commit_id=d2ae2c283df3d42e72a964d8891e0915f8f3a94b. Issue can't be reproduced with okular 20.08.3 (no other changes to the system was made). STEPS TO REPRODUCE 1. Run "okular ~/Fedora-29-xrdp.md"; 2. Check used backend in Help -> About Backend. OBSERVED RESULT "Txt backend" is used. EXPECTED RESULT "Markdown Backend" should be used instead. SOFTWARE/OS VERSIONS Operating System: Fedora 33 KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2 Kernel Version: 5.9.13-200.fc33.x86_64 OS Type: 64-bit Processors: 4 × AMD FX(tm)-9590 Eight-Core Processor Memory: 22.4 ГиБ of RAM Graphics Processor: GeForce GTX 1060 6GB/PCIe/SSE2
Same here. Okular 20.12 Frameworks 5.76.0 Qt 5.15.2
Same here. OS: Arch Linux x86_64 Kernel: 5.4.84-1-lts KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2 Okular Version: 20.12.0
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/347
Git commit 9e23338b002cd14d8a9ad191526a7950e72d97e9 by Albert Astals Cid. Committed on 27/12/2020 at 00:16. Pushed by aacid into branch 'release/20.12'. Fix opening markdown files In d2ae2c283df3d42e72a964d8891e0915f8f3a94b we introduced a tweak that broke opening markdown files. what we really want is this: * If the mimetype from the filename is text (or children) but looking at the data says it's not text, then try opening first opening with the data suggeted mimetype * But if the data suggested mimetype says it's text, use the filename suggested mimetype since for example, the only way to really differentiate markdown from text is the filename, so trust that M +4 -2 part/part.cpp https://invent.kde.org/graphics/okular/commit/9e23338b002cd14d8a9ad191526a7950e72d97e9
*** Bug 431183 has been marked as a duplicate of this bug. ***
I'm reopening this bug as I've got the same behavior in the newer version (21.08.3). OS: Arch Linux x86_64 Kernel: 5.15.3-arch1-1 KDE Plasma Version: 5.23.3 KDE Gear: 21.08.3 Qt Version: 5.15.2 Okular Version: 21.08.3
The attached file works, so you'll have to give us one that doesn't
After an update and a reboot, it started to work for me too. Sorry for the fuss.
I have a lot of markdown documents opening with the Txt backend. Figured it out eventually, it seems to me like it's a bug. Attached 2 files, one opens with the Txt backend and the other with the Markdown backend. - Both are 'mime-type: text/plain' - Both show in Dolphin as 'Type: Markdown document' (*.md) But Dolphin properties show different recognized content: 'markdown.md' shows correctly 'Content: plain text document' 'notmarkdown.md' shows incorrectly 'Content: MATLAB file' The difference that triggers the content to be misdiagnosed is how the first line starts. Remove the first line from 'markdown.md' and the content changes to MATLAB document, consequently opening the file in Okular with the Txt backend.
Created attachment 147560 [details] Opens as markdown document
Created attachment 147561 [details] Doesn't open as markdown document
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/645
Git commit 01871fdfff9363af3a90959650ef20ab9276c464 by Albert Astals Cid. Committed on 31/08/2022 at 16:55. Pushed by aacid into branch 'release/22.08'. Even more tweaks to opening "text" files Related: bug 456434 M +10 -1 part/part.cpp https://invent.kde.org/graphics/okular/commit/01871fdfff9363af3a90959650ef20ab9276c464