Mermaid class diagram view is broken (Gitlab 12.6.2-ee)

Summary

In an on premise Gitlab 12.6.2-ee installation, mermaid class diagram views are broken. The view looks not like in the Mermaid Live Editor. If you view for example sequence class diagrams (written in mermaid), everything looks fine. We had the same issue in Gitlab 12.5.0-ee and Gitlab 12.5.3-ee. (using docker images from official gitlab/gitlab-ee:12.X.X-ee repository).

Steps to reproduce

  1. create any class diagram (written in mermaid) in .md file in gitlab, e.g. with
```mermaid
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimpa
Class01 : int gorilla
Class08 <--> C2: Cool label

Do not forget at the end the missing. ```.

  1. View the markdown file via gitlab gui and see the broken class diagram view.

What is the current bug behavior?

The view of the class diagram is broken, see Gitlab_Mermaid_Example

What is the expected correct behavior?

The view of the class diagram should look like in the Mermaid Live Editor: Mermaid_Live_Editor_Example

Relevant logs and/or screenshots

In gitlab instance, there are no errors shown in the logs.

Output of checks

This bug happens on GitLab on premise installation.

  • Gitlab 12.6.2-ee (cf39803b)
  • Mermaid Version 8.4.2 (https://gitlab.com/gitlab-org/gitlab/blob/v12.6.2-ee/package.json#L97)

Results of GitLab environment info

Expand for output related to GitLab environment info

Output of sudo gitlab-rake gitlab:env:info:

System information
System:		
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.6.3p62
Gem Version:	2.7.9
Bundler Version:1.17.3
Rake Version:	12.3.3
Redis Version:	3.2.12
Git Version:	2.24.1
Sidekiq Version:5.2.7
Go Version:	unknown

GitLab information
Version:	12.6.2-ee
Revision:	cf39803b81f
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	9.6.11
URL:		https://[my-url]
HTTP Clone URL:	https://[my-url]/some-group/some-project.git
SSH Clone URL:	git@git.[my-url]:some-group/some-project.git
Elasticsearch:	yes
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: 

GitLab Shell
Version:	10.3.0
Repository storage paths:
- default: 	/gitlab-data/[my-folder]/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Output of sudo gitlab-rake gitlab:check SANITIZE=true:

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 10.3.0 ? ... OK (10.3.0)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
7/5 ... yes
....
Redis version >= 2.8.0? ... yes
Ruby version >= 2.5.3 ? ... yes (2.6.3)
Git version >= 2.22.0 ? ... yes (2.24.1)
Git user has default SSH configuration? ... yes
Active users: ... 60
Is authorized keys file accessible? ... yes
Elasticsearch version 5.6 - 6.x? ... yes (6.4.2)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished

Possible fixes

Not found right now.

Edited Jan 08, 2020 by Michael J.
Assignee Loading
Time tracking Loading