Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Render Markdown with inline PlantUML #41

Open
sangxxh opened this issue Aug 11, 2019 · 4 comments
Open

feature: Render Markdown with inline PlantUML #41

sangxxh opened this issue Aug 11, 2019 · 4 comments
Labels

Comments

@sangxxh
Copy link

sangxxh commented Aug 11, 2019

Problem:

It'd be very powerful if md-to-pdf can also render inline PlantUML diagrams when converting .md to .pdf

Solution:

Use a PlantUML parser to convert text within uml or plantuml code block to SVG image and render them along with the PDF:

```plantuml
@startuml
:Hello world;
:This is defined on
several **lines**;
@enduml
@simonhaenisch
Copy link
Owner

Interesting idea, but I'd rather not implement it in the core (since there's many other diagram syntaxes)... instead, marked is pretty simple to extend, so I assume it would be pretty straightforward to inject a plantuml parser.

I'll think about how I can expose extending the parser, and keep you updated. I'm working on a new major release though (v3), so this feature will only come along with that release.

@hadrien-toma
Copy link

hadrien-toma commented Sep 20, 2020

@simonhaenisch is the parser exposed now? Can you provide an example on how to extend it? This sounds very interesting! 😍

@simonhaenisch
Copy link
Owner

No I don't think it's exposed yet (only options which includes the renderer) but I'm open to PRs for that 🤓 (I don't have much free time at the moment)

@PeterDaveHello
Copy link

This will be a great feature, would love to see it very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants