asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
149 stars 50 forks source link

outdated kroki server #364

Closed ferrao closed 2 years ago

ferrao commented 2 years ago

I am having issues rendering mermaid diagrams with kroki, but they render just fine using mermaid or asciidoctor-diagram. Not sure what is the version of mermaid that is running on kroki.io, but I suspect it might be outdated.

Looking at kroki it seems to have the latest mermaid version (8.14.0). Any chance you can update on your side?

ggrossetie commented 2 years ago

This extension does rely on https://kroki.io or on a local server. Could you please provide a reproduction case?

ferrao commented 2 years ago

This extension does rely on https://kroki.io or on a local server.

But is it using your fork ? If so, it is outdated and using mermaid 8.5.0. My diagrams render ok in the latest 8.14.0

Could you please provide a reproduction case?

Yes, let me try to get something that fails to you.

ferrao commented 2 years ago

@Mogztter while trying to get a minimal example for you I found the problem.

When using note and the <> chars, we need to escape them as html entities &lt; and &gt;

But for some reason, mermaid 8.14.0 does not need that.

ggrossetie commented 2 years ago

But is it using your fork ? If so, it is outdated and using mermaid 8.5.0. My diagrams render ok in the latest 8.14.0

No, this extension is using the version deployed on https://kroki.io/

When using note and the <> chars, we need to escape them as html entities < and > But for some reason, mermaid 8.14.0 does not need that.

Could you please provide a minimal example?

ferrao commented 2 years ago

Could you please provide a minimal example?

sequenceDiagram
    rect rgba(200, 150, 255, 0.2)
    participant John
    Note over John: Text in <<note>>
    end

With the mermaid cli this diagram renders as:

$ mmdc -i example.mmdc -o example.svg example

But in Kroki.io it renders as:

2022-04-21-110658_1115x267_escrotum

If you replace <> with the respective html entities it renders ok:

2022-04-21-110841_967x395_escrotum

ggrossetie commented 2 years ago

Thanks for providing a minimal reproduction case. I believe this is a bug in yuzutech/kroki. I cannot move this issue, so I've created a new one: https://github.com/yuzutech/kroki/issues/1253