Blob rendering of markdown is sometimes incorrect
A customer is having an issue where a README.md
markdown file renders correctly when viewing from the main repository page, but when viewing the file from it's own page, some code blocks (including mermaid blocks) are not rendered correctly.
For example, when looking at https://gitlab.com/digitalmoksha/bug-reproduction/-/tree/master, you can see the mermaid block is rendered correctly
However, clicking on the file and looking at it directly, the mermaid block does not render:
The markdown for this failing case is
# Header 1
paragraph
paragraph
## Header 2
paragraph
pcloud/provet/foo/api/ └── init.py
paragraph
```python
from pcloud.provet.foo import models
paragraph
from rest_framework import viewsets
flowchart TD
START([Start])
200([200 OK])
201([201 Created])
At the moment, this is the smallest file that reproduces the problem. Removing, for example, the first `paragraph` line after the `# Header 1` causes the file to render correctly.
It's not specifically a mermaid problem. I have also see the problem begin to happen at basically the same point in the file with code block syntax highlighting. You can see that problem shown in the customer recreation file:
https://gitlab.com/cmutua/test-markdown-from-customer/-/blob/main/README.md?plain=0
The problem is not isolated to a `README.md` file. It can happen with any markdown file in the repository. However a `README.md` file shows how it works fine in the default view, and fails when viewing the file specifically.