Fix bug regarding broken mermaid markdown rendering in milestone view
What does this MR do and why?
This MR addresses the following issues / bug reports:
- Mermaid Graphs in Milestones (#389913 - closed)
- Mermaid Gantt Chart does not render in Milestone (#393049 - closed)
Screenshots or screen recordings
The left side shows gitlab.com and the broken mermaid markdown rendering. Left side shows my local dev environment.
How to set up and validate locally
- Go to any milestone detail page, e.g. http://127.0.0.1:3000/jashkenas/Underscore/-/milestones/6
- Edit the milestone to include a mermaid markdown, e.g.
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d
```
- Save and the mermaid template should be rendered properly as shown in the screenshot
TODO
-
Write feature spec in spec/features/markdown/sandboxed_mermaid_spec.rb -
Refactoring of new js code => align with existing codebase
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
-
Changelog entry added, if necessary - [-]
Documentation created/updated via this MR - [-]
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides - [-]
Conforms to the database guides
Related to #389913 (closed) and #393049 (closed)
Edited by Gerardo Navarro