Bug 460088 - Code in markdown not properly displayed
Summary: Code in markdown not properly displayed
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 22.08.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-07 12:33 UTC by mahlzahn
Modified: 2022-10-10 13:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Test document for code in markdown (279 bytes, text/markdown)
2022-10-07 12:33 UTC, mahlzahn
Details

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