Created attachment 181190 [details] Bug reproduction screenshot SUMMARY If the following requirements are met for a Markdown document: * The file is saved with (UTF-8) BOM * The 1st-level heading is at the beginning of the file The 1st-level heading will be wrongly rendered as regular text. STEPS TO REPRODUCE 1. Launch Kate. 2. In Kate, create a new Markdown document. 3. In the new document, write `# title` at the beginning of the file. 4. Toggle the Tools > Add Byte Order Mark (BOM) menu option. 5. Save the file. 6. Open the saved file using Okular and verify its rendered result. OBSERVED RESULT The 1st-level heading is wrongly rendered as regular text. EXPECTED RESULT The 1st-level heading is correctly rendered as 1st-level heading. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Ubuntu 24.04 KDE Plasma Version: 5.27.12 KDE Frameworks Version(Flatpak): 6.13.0 Qt Version(Flatpak): 6.9.0 ADDITIONAL INFORMATION Reproduced on the Flatpak distribution of Okular, version 25.04.1.
Markdown backend version: 0.1.0
Created attachment 181191 [details] Minimal Markdown document for bug reproduction
Created attachment 181192 [details] Workarounded bug reproduction file(just strip the BOM will do)
Confirmed on Arch Linux in Okular 25.04.0