Skip to content

Showing Mermaid Diagram in Wiki doesn't work #7409

@micronet24

Description

@micronet24

Gogs version

0.14.0+dev

Git version

  • Server: 2.30.2
  • Client: N/A

Operating system

Debian 11

Database

MySQL

Describe the bug

Writing Mermaid code to some .md-file in the Repo (eg. README.md) will render the diagram as expected (as implemented in #4229 )

However moving the same file into the Wiki will just display the plain mermaid code instead of the diagram.

To reproduce

Add a Wiki-Page with the following content

graph LR
    A -> B
Loading

Expected behavior

The mermaid graph is rendered in the browser.

Additional context

In templates/base/footer.tmpl the code block importing the mermaid library is guarded by an {{if .IsMarkdown}}. This flag seems not to be set, when viewing Wiki pages.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    💊 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions