Replies: 2 comments 2 replies
-
Historically Print uses the same rendering pipeline as the built-in Markdown preview so as to get the benefits of any Markdown extensions that may be installed. There is, as you probably know, a Mermaid Markdown extension for VS Code that works with the built-in Markdown preview. It doesn't work with Print because it depends on script running in the browser, and the way the script is handled in the built-in Markdown rendering pipeline is not compatible with Print. Recently I have been working on a document rendering extension for Print that uses a library called pagedjs to string a bunch of Markdown documents together as chapters of a book. It has fundamentally the same problem. To deal with it I built my own Markdown rendering pipeline and handled scripts myself. If I were to rewrite the Print Markdown rendering pipeline to behave the same way, it would be possible to support pipeline extensions that run script in the browser, such as Mermaid. However, to meet not unreasonable user expectations I'd have to figure out what Markdown extensions are installed and do some jiggery pokery to get the same functionality into my own pipeline. It's a reasonable request, and I know how to do it, but it's a lot more work than one might think. Of course, if someone got keen and put together a PR, this would be very warmly received. Technical assistance would definitely be available for such brave souls. If someone were to take this on, Markdown rendering could be broken out into a separate extension that overrides the one baked into Print, allowing experimental deployment and taking the pressure off by having its own release cycle. When it reached maturity, baked in support could be dropped and an extension dependency declared. |
Beta Was this translation helpful? Give feedback.
-
OK brand new rendering pipeline with support for Mermaid among many other diagramming notations. Here's what is currently supported.
|
Beta Was this translation helpful? Give feedback.
-
It would be great if support for Mermaid charts could be added. That would allow us to keep documentation in repo, but distribute to less technical persons as PDF. :-)
Beta Was this translation helpful? Give feedback.
All reactions