Commit 07f5ccbe authored by Christopher Stryker's avatar Christopher Stryker Committed by Kushal Pandya

Assign gfm-mermaid class to mermaid diagrams and add appropriate CSS to ensure...

Assign gfm-mermaid class to mermaid diagrams and add appropriate CSS to ensure the width of the rendered SVG doesn't exceed that of the browser.
parent 1f2ef687
...@@ -82,7 +82,7 @@ function renderMermaidEl(el) { ...@@ -82,7 +82,7 @@ function renderMermaidEl(el) {
return; return;
} }
svg.classList.add('mermaid'); svg.classList.add('mermaid', 'mw-100');
// pre > code > svg // pre > code > svg
svg.closest('pre').replaceWith(svg); svg.closest('pre').replaceWith(svg);
......
---
title: Force mermaid diagrams to be scaled to fit within browser window when used in markdown
merge_request: 25016
author: Christopher Stryker
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment