Bug 499497 - Okular renders Markdown files wrongly. Code blocks are not always recognized.
Summary: Okular renders Markdown files wrongly. Code blocks are not always recognized.
Status: RESOLVED DUPLICATE of bug 484443
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (other bugs)
Version First Reported In: 23.08.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-04 10:54 UTC by Paul Sommer
Modified: 2025-02-11 05:54 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Sommer 2025-02-04 10:54:55 UTC
SUMMARY
Okular renders Markdown files wrongly. Code blocks are not always recognized.

STEPS TO REPRODUCE
1. create a .md file with a code block like so:

The is a line with some arbitrary text. Next line is code.
```
my_project/
│-- src/                # Quellcode des Programms
│   │-- main.py         # Haupteinstiegspunkt
```
2. open it in Okular

OBSERVED RESULT
The code part is not reconized as code and is printed like so:

The is a line with some arbritary test. Next line is code
my_project/ │-- src/                # Quellcode des Programms │   │-- main.py         # Haupteinstiegspunkt

EXPECTED RESULT
The code should be printed as code


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 24.04
KDE Plasma Version: current
KDE Frameworks Version: current
Qt Version: current

ADDITIONAL INFORMATION
Things work as intended when there is a blank line before the opening ```

I don't know what the official standard behavior is, but all markup renderers I know output code as code even without a previous blank line.
Comment 1 John Kizer 2025-02-11 05:54:20 UTC
Hi - merging this in with the previous bug that was filed for this topic. For what it's worth, the specific upstream issue that's referenced in the comments there is https://github.com/Orc/discount/issues/286

Thanks!

*** This bug has been marked as a duplicate of bug 484443 ***