vscode-markdown-pdf icon indicating copy to clipboard operation
vscode-markdown-pdf copied to clipboard

Export to PDF not compatible with mermaid version 9.1.3

Open JohnLuCN opened this issue 3 years ago • 4 comments
trafficstars

Hi everyone, I encountered " Syntax error in graph, mermaid version 9.1.3" when trying to export to PDF, but it works well when trying with "export to HTML", which used to be working fine, not sure what's the problem now with the "export to PDF" function.

Anyone could help to check and get it fixed?

Thank you in advance~

JohnLuCN avatar Jul 10 '22 13:07 JohnLuCN

Same error here

It works with html because there is no need to convert the mermaid code which is only copied to the final html document and interpreted with js code from there.

yobuntu avatar Jul 12 '22 15:07 yobuntu

I don't know if this workaround is correct, but this error seems to occur starting from 9.1.0 of mermaid.js.

By changing the following parameters as follows, the error did not occur when exporting mermaid.

markdown-pdf.mermaidServer
https://unpkg.com/[email protected]/dist/mermaid.min.js

kometchtech avatar Jul 14 '22 06:07 kometchtech

I don't know if this workaround is correct, but this error seems to occur starting from 9.1.0 of mermaid.js.

By changing the following parameters as follows, the error did not occur when exporting mermaid.

markdown-pdf.mermaidServer
https://unpkg.com/[email protected]/dist/mermaid.min.js

Where to change?

zhouhao27 avatar Sep 01 '22 04:09 zhouhao27

@zhouhao27 [configuration] -> [extension] -> [Markdown PDF] -> [Markdown-PDF: Mermaid Server]

image

kometchtech avatar Sep 01 '22 04:09 kometchtech