plantuml / plantuml.js

PlantUML that runs completely on javascript without needing java/servers
https://plantuml.github.io/plantuml.js/
MIT License
188 stars 25 forks source link

Issue with examples #51

Closed vigneshmanick closed 1 year ago

vigneshmanick commented 1 year ago

Hello,

when trying to run the examples i get the following error.

Unresolved directive in <stdin> - include::http://localhost:8080/sequence-diagram.adoc[]

The steps i did are

cd examples/
cd 02-asciidoctor.js/
npm i
npm start

can you please assist me here.

Thanks!

sakirtemel commented 1 year ago

The issue was localhost:8080 is not reachable for your case. I verified similar issuue witth using Github Codespaces and added a fix. Please get the new changes, it should work now.

vigneshmanick commented 1 year ago

@sakirtemel thanks for the quick response. This does work, i have found further issues.

  1. Modifying the data and rerunning npm start doesn't update the data. I had to clear browser cache each time
  2. When multiple plantuml diagrams are defined, the last diagram overwrites every other object. (all diagrams show render of the last object)
== PlantUML.js with Asciidoctor.js Example

[source,plantuml]
----
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
----

== Another diagram

[source,plantuml]
----
@startuml
Matt -> Mickey: New Request
Mickey -> Matt: Confirm
@enduml
----

image

sakirtemel commented 1 year ago

@vigneshmanick interesting findings! I believe I've tried multiple diagrams at once and it worked, but there's a chance that it was just luck :) because actually they're writing to the same file every time under local storage. I'll check it out and will correct them

sakirtemel commented 1 year ago

@vigneshmanick I updated the example to contain two diagrams, right now it seems to be working: https://github.com/plantuml/plantuml.js/tree/main/examples/02-asciidoctor.js

please let me know if either of the issues above are still occurring?

vigneshmanick commented 1 year ago

@sakirtemel thanks for the update, i have tested it and can confirm that the examples are working even with multiple diagrams.

Thanks!