From a3cc2b80f6b56bb5dde8703490b14b25d187c888 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 11 Dec 2024 17:57:19 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13417 --- app/src/protyle/export/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 09d6be590..27644c314 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -318,6 +318,9 @@ const renderPDF = async (id: string) => { item.style.width = Math.min(item.clientWidth, width) + "px"; item.removeAttribute('data-render'); }) + previewElement.querySelectorAll('[data-type="NodeCodeBlock"][data-subtype="mermaid"] svg').forEach((item) => { + item.style.maxHeight = width * 1.414 + "px"; + }) Protyle.mathRender(previewElement, "${servePath}/stage/protyle", true); previewElement.querySelectorAll("table").forEach(item => { if (item.clientWidth > item.parentElement.clientWidth) {