Bug 484443 - Okular markdown backend code fence problem
Summary: Okular markdown backend code fence problem
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 22.12.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 11:07 UTC by sebastienvalente
Modified: 2024-03-25 15:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sebastienvalente 2024-03-25 11:07:05 UTC
SUMMARY
When using code fence after an empty line, it's well rendered, but it's rendered as inline code when there's no empty line before.

STEPS TO REPRODUCE
1. Create a "good.md" file
2. Put the following contents inside (note the empty line after "First line"):
First line

```
my code
fence
```
Last line
3. Create a "bad.md" file
4. Put the following contents inside (no empty line this time):
First line
```
my code
fence
```

OBSERVED RESULT
* good.md: the code fence is well displayed
* bad.md: the code fence isn't well displayed (rendered as an inline code)

EXPECTED RESULT
The same result as with good.md

SOFTWARE/OS VERSIONS
Linux: Debian GNU/Linux 12 (bookworm)
KDE Plasma Version: None, only the okular and okular-extra-backends packages installed (with kde dependencies)

ADDITIONAL INFORMATION
Reference about no line needed before code fence here: https://spec.commonmark.org/0.31.2/#fenced-code-block
Comment 1 Yuri Chornoivan 2024-03-25 15:19:41 UTC
Okular only shows that its backend (discount) outputs. It seems this is the problem in the backend (upstream).

https://github.com/Orc/discount
Comment 2 sebastienvalente 2024-03-25 15:26:10 UTC
(In reply to Yuri Chornoivan from comment #1)
> Okular only shows that its backend (discount) outputs. It seems this is the
> problem in the backend (upstream).
> 
> https://github.com/Orc/discount

Oh I see, thanks for the info: this issue can then be closed, I'll see with the link you provided.