2

I'm using AsciidocFX for creating documentation. Variables created in asciidoc need to be replaced in diagrams. An example which doesn't work:

== My title
:parent-class: Parent
:child-class: Child

[plantuml,"class-inheritence",svg,subs=attributes+]
....
class {parent-class}
class {child-class}
{parent-class} <|-- {child-class}
....

Instead of class diagram, following result is shown. What is wrong?

enter image description here

drewpol
  • 665
  • 1
  • 6
  • 26

1 Answers1

1

When I paste your Asciidoc snippet into Eclipse Asciidoctor Editor (v2.4.1) there is absolutely nothing wrong with your code (see next picture).
Just a note: I am the author of the mentioned eclipse plugin.

Looking at your error message, the problem seems to be not at Asciidoctor level but on plantuml: Those error info pictures are generated by plantuml.jar when it comes to errors.

An option is, that AsciidoctorFX (or the installed/used Asciidoctor version) does not replace the place holders (parent-class, child-class) correctly and just give plantuml the plain, unchanged plantuml code - looking at the error message this looks very likely to be the problem.

So I think AsciidoctorFX uses an incompatible or outdated plantuml version or an old Asciidoctor version (or you have installed an old one and AsciidoctorFX is using this).

Maybe you can just update your AsciidoctorFX installation or the used Asciidoctor installation? If this is not helping, you could add an issue at https://github.com/asciidocfx/AsciidocFX/issues so it can be fixed by the maintainers.

Pasted code into eclipse asciidoctor editor plugin

de-jcup
  • 1,402
  • 12
  • 27