Ensure a consistent GitLab Flavored Markdown experience across GitLab and Duo UI
Problem to solve
With the exception of tables and code blocks, most GFM components don't render in Duo UI which is very apparent in the new panels UI. This creates an inconsistent experience across the rest of GitLab and Duo UI chat. In Fix GLQL visualization in Duo chat UI (#573052) we're resolving the issue for GFM GLQL rendering, but the problem remains for the rest like links to users, groups and mermaid diagrams.
The root cause seems to be because Duo UI renders its markdown in a different format compare to the monolith, which in turn causes GFM to not detect and render embedded components.
Screenshot
Considerations
For maintainability and planning it should be noted that as I understand it the current version of Duo UI https://gitlab.com/gitlab-org/duo-ui is essentially no longer supported and is set to be replaced by a Duo UI next. So any changes made should also target the upcoming version.
The duo UI package is also used in IDEs, so any changes need to be compatible with that environment as well.
Suggested proposal
One solution would be to modify Duo UI's markdown rendered to match the monolith's format.
Another option is to take the approach of Resolve GLQL not rendering in Duo chat (!209488) and update GFM to detect and be compatible with Duo UI's markdown renderer.