Bug 460088

Summary: Code in markdown not properly displayed
Product: [Applications] okular Reporter: mahlzahn <pomeranze+kde.org>
Component: markdown backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal CC: aacid, yurchor
Priority: NOR    
Version First Reported In: 22.08.1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Test document for code in markdown

Description mahlzahn 2022-10-07 12:33:21 UTC
Created attachment 152627 [details]
Test document for code in markdown

SUMMARY
Code in markdown not properly displayed


STEPS TO REPRODUCE
1. Create a markdown text, e.g. like in attached test.md
2. Open with Okular

OBSERVED RESULT
Code not rendered as code, but as normal text

EXPECTED RESULT
Code rendered with monospace font and possibly other background, maybe even syntax highlighting

SOFTWARE/OS VERSIONS
KDE Plasma Version: None
KDE Frameworks Version: Version 5.98.0
Qt Version: Version 5.15.6 (built against 5.15.5)
Comment 1 Yuri Chornoivan 2022-10-07 13:46:55 UTC
(In reply to mahlzahn from comment #0)
> Created attachment 152627 [details]
> Test document for code in markdown
> 
> SUMMARY
> Code in markdown not properly displayed
> 
> 
> STEPS TO REPRODUCE
> 1. Create a markdown text, e.g. like in attached test.md
> 2. Open with Okular
> 
> OBSERVED RESULT
> Code not rendered as code, but as normal text
> 
> EXPECTED RESULT
> Code rendered with monospace font and possibly other background, maybe even
> syntax highlighting
> 
> SOFTWARE/OS VERSIONS
> KDE Plasma Version: None
> KDE Frameworks Version: Version 5.98.0
> Qt Version: Version 5.15.6 (built against 5.15.5)

That is how it is parsed by Discount (our Markdown backend). It cannot parse this extended syntax. I think that it is an upstream issue.

https://github.com/Orc/discount
Comment 2 Albert Astals Cid 2022-10-07 21:09:22 UTC
The code is defintely monospace here

https://i.imgur.com/PFhuIRw.png
Comment 3 mahlzahn 2022-10-10 13:56:57 UTC
That’s how it looks for me:
https://imgur.com/5ez2Qyc.png
And it’s not only about extended Markdown, but also the normal one is not showing for me in Monospace. Maybe it is just a font issue. The code itself seems to be detected and shown as a block. Is there some additional dependency needed for the correct monospace font?