Skip to content

Mermaid code block truncated on homepage causes parse error #36582

@tyroneyeh

Description

@tyroneyeh

Description

When a comment containing a Mermaid diagram is truncated on the homepage (max 200 chars),
the code block may not be closed properly, causing a "Parse error" in the rendered diagram.
Additionally, Mermaid pipelines using '|' are sometimes truncated incorrectly.

https://demo.gitea.com/tyroneyeh/TestRepo/issues/1

Gitea Version

1.25.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Home:
Image

Git Version

No response

Operating System

linux

How are you running Gitea?

command-line

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions