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

Blanks in diagram names lead to missing image of diagram preview #328

Closed
rnwolf opened this issue Sep 6, 2019 · 2 comments
Closed

Blanks in diagram names lead to missing image of diagram preview #328

rnwolf opened this issue Sep 6, 2019 · 2 comments

Comments

@rnwolf
Copy link

rnwolf commented Sep 6, 2019

No image being rendered for pantuml diagram below. Is it possible to specify the location of the pantuml.jar to use? Alternatively it seems that it might be possible to update the version of
asciidoctor-diagram?
It seems like the current version is name="org.asciidoctor:asciidoctorj-diagram:1.5.0"
And the latest version is 1.5.19.

https://github.com/asciidoctor/asciidoctor-diagram/blob/master/CHANGELOG.adoc

http://plantuml.com/changes

See more examples: http://plantuml.com/gantt-diagram

This does not work:

[plantuml,'This is a header',png]
----
@startgantt
[Task1] lasts 10 days
then [Task2] lasts 4 days
-- Phase Two --
then [Task3] lasts 5 days
then [Task4] lasts 6 days
@endgantt
----

This does work fine:

[plantuml,'Helloworld',png]
----
@startuml
Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request Alice <-- Bob: another Response
@enduml
----

AsciiDoc Plugin Version: 0.29.10
IDE Name and Version: Pycharm 2019.2 (prof edition) build #PY-192.5728.105)

@ahus1
Copy link
Contributor

ahus1 commented Sep 6, 2019

Thank you for reporting this.

The second parameter is actually the file name and not a header. I found that the current plugin version doesn't handle blanks in file names for previews of images.

The following diagram works for me:

[plantuml,'diagram',png]
----
@startgantt
[Task1] lasts 10 days
then [Task2] lasts 4 days
-- Phase Two --
then [Task3] lasts 5 days
then [Task4] lasts 6 days
@endgantt
----

Please note that all file names need to be unique within your document so that one diagram doesn't overwrite another.

The plugin include AsciidoctorJ-Diagram 1.5.18, the latest version available of AsciidoctorJ-Diagram. This in turn include the Apache-licensed PlantUML library. To show the version of the bundled PlantUML library, please use:

[plantuml,info,png]
----
@startuml
version
@enduml
----

This states 1.2019.06 for the latest (preview) release of the plugin.

@ahus1 ahus1 changed the title pantuml diagram below Blanks in diagram names lead to missing image of diagram preview Sep 6, 2019
@ahus1
Copy link
Contributor

ahus1 commented Sep 7, 2019

I've address this in pre-release 0.30.3. Blanks in diagram's file names now work in the preview.

The new pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

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

No branches or pull requests

2 participants