Bug 473940 - Markdown code block is rendered interpreted as Markdown
Summary: Markdown code block is rendered interpreted as Markdown
Status: RESOLVED DUPLICATE of bug 475198
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 23.08.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-30 11:58 UTC by Jarno van der Kolk
Modified: 2023-10-05 21:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example from report attached as a separate file (663 bytes, text/markdown)
2023-10-03 23:41 UTC, akb825
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarno van der Kolk 2023-08-30 11:58:33 UTC
SUMMARY
Code blocks inside of ``` are still interpreted as Markdown with only the Monospace font applied. For example, a comment inside a code block starting with # is rendered as a header. Also newlines are not kept like in normal Markdown rendering.

STEPS TO REPRODUCE
Write a code block like this:
---START OF EXAMPLE MARKDOWN---
### Culling
Do we need culling? That is, shut down notebooks when the user has long ago left? Or do we expect students to run sessions overnight?

Relevant options for `/opt/jupyterhub/etc/jupyterhub/jupyterhub_config.py`:

```
# shutdown the server after no activity for 20 minutes
c.NotebookApp.shutdown_no_activity_timeout = 20 * 60
# shutdown kernels after no activity for 10 minutes
c.MappingKernelManager.cull_idle_timeout = 10 * 60
# Check every minute
c.MappingKernelManager.cull_interval = 60
# cull connected (e.g. Browser tab open)
c.MappingKernelManager.cull_connected = True
```

## Monitoring

Prometheus allows for monitoring of the cluster health
---END OF EXAMPLE MARKDOWN---

OBSERVED RESULT
Inside the rendered code block, newlines disappear and lines starting with # are being rendered as headers.


EXPECTED RESULT
Code block should not be rendered as markdown but show the code exactly as is.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 23.08.0
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
I think this started happening after the update to 23.08.0 so it's very recent.
Comment 1 Albert Astals Cid 2023-09-11 21:17:44 UTC
Please attach a file that contains what you think is the mistake
Comment 2 akb825 2023-10-03 23:41:57 UTC
Created attachment 162068 [details]
Example from report attached as a separate file

An example is in the original reporter's summary. I have attached it as a separate file. Best I can tell is it's completely ignoring the code block, and in fact shows the raw ``` markers for the code block.
Comment 3 Albert Astals Cid 2023-10-05 21:38:11 UTC

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