Open sandro-qiang opened 3 years ago
Whether the problem has been solved?
When inserting a similar example as on the top:
@startditaa
+--------+ +-------+ +-------+
| +---+ ditaa +-->| |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| | | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
+------------------------+
@endditaa
I get the following gibberish added to my document:
I guess that other plantuml diagrams generate SVG images but ditaa can't so plantuml with ditaa doesn't work.
In https://plantuml.com/en/ditaa:
On PlantUML, only PNG generation is supported.
It seems that the workaround is to use Kroki.
In 0.7.0 Release:
🗑 Removed
ditaa.jar
file from themume
project. Also removed the native support of rendering ditaa diagrams. But you can now use Kroki to render theditaa
diagrams. ...
- 🎉 Added Kroki support to render diagrams. This is a beta feature. For example:
```ditaa {kroki=true} +--------+ +-------+ +-------+ | | --+ ditaa +--> | | | Text | +-------+ |diagram| |Document| |!magic!| | | | {d}| | | | | +---+----+ +-------+ +-------+ : ^ | Lots of work | +-------------------------+
I think that either one of the following will fix it.
As for the former, though ditaa 0.11 supports SVG, plantuml drops the feature. See https://github.com/plantuml/plantuml/issues/389
As for the latter, in https://github.com/shd101wyy/crossnote/blob/0.9.9/src/renderers/puml.ts#L62-L82, markdown preview enhanced captures output of plantuml process and detects the end by checking </svg>
. I think that both SVG and PNG can be captured there as follows:
<svg
, read the rest as string until </svg>
as the present code does.IEND
chunk. See https://www.w3.org/TR/PNG-Structure.htmlI don't know what to do after that.
plantuml support syntax like
or
but not working in markdown-preview-enhanced's preview window, it hang forever.
I tested manually in terminal with plantuml.jar in markdown-preview-enhanced's dependencies directroy, it not hang.