From 8085c753564b61a9ed0f2b7054514ff8dadd069c Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 23 Oct 2025 06:43:52 +0200 Subject: [PATCH] Remove mermaid margin workaround (#35732) https://github.com/mermaid-js/mermaid/issues/4907 was fixed with mermaid v11, so we no longer need to ship this workaround. The test case works as expected: image --- web_src/js/markup/mermaid.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web_src/js/markup/mermaid.ts b/web_src/js/markup/mermaid.ts index 33d9a1ed9b..ddd53a7035 100644 --- a/web_src/js/markup/mermaid.ts +++ b/web_src/js/markup/mermaid.ts @@ -6,11 +6,9 @@ import {html, htmlRaw} from '../utils/html.ts'; const {mermaidMaxSourceCharacters} = window.config; -// margin removal is for https://github.com/mermaid-js/mermaid/issues/4907 const iframeCss = `:root {color-scheme: normal} body {margin: 0; padding: 0; overflow: hidden} -#mermaid {display: block; margin: 0 auto} -blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {margin: 0}`; +#mermaid {display: block; margin: 0 auto}`; export async function initMarkupCodeMermaid(elMarkup: HTMLElement): Promise { // .markup code.language-mermaid