joplin-plugin-plantUML icon indicating copy to clipboard operation
joplin-plugin-plantUML copied to clipboard

Diagrams order is incorrect in exported file

Open Teddy12090 opened this issue 1 year ago • 6 comments

Environment:

  • PlantUML2: 1.11.0
  • Joplin 2.10.19 (prod, darwin)
    • higher versions are also incorrect

source:

```plantuml
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

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

```plantuml
@startuml
class Parent
class Child
Parent <|-- Child
@enduml
```

expected: image

actual: (via Export -> HTML - HTML File) image

The order of the two diagrams is incorrect. The class diagram should be on the top of the sequence diagram.

I think it may be easier to check the result using rick text editor, it also shows the incorrect order.

image

Teddy12090 avatar Jun 27 '23 17:06 Teddy12090

v1.9 works, but v1.10 and 1.11 don't work

Teddy12090 avatar Jun 30 '23 10:06 Teddy12090

I found that the bug is caused by this commit (https://github.com/marc0l92/joplin-plugin-plantUML/commit/20f48682b0b054d0b2a4ff4e8fe80bd610bfb285) and it was introduced after v1.10.

I have tried removing previousDiagramId and checked the result, and it indeed resolves the bug. However, since I am not experienced in frontend development, I am unable to assess the potential side effects of removing previousDiagramId. Could anyone help with this issue? Thanks.

Teddy12090 avatar Jun 30 '23 16:06 Teddy12090

Hi I have the same problem it would be great if it can be fixed thanks a lot

gletaille avatar Sep 20 '23 07:09 gletaille

Just encoutered the same bug as well. Is there any workaround for this in the meantime?

milanmarcinco avatar Nov 18 '23 15:11 milanmarcinco

Hi, guys! Have the same problem

dimau avatar Feb 28 '24 14:02 dimau