two objects with same name rendered only once

0 votes
asked May 3, 2023 in Bug by chrikoch (140 points)

I have the following plantuml code:

@startuml
rectangle "A" {
  rectangle "group" {
    rectangle "B"
  }
}

rectangle "C " {
  rectangle "group" {
    rectangle "D"
  }
}
@enduml

I'd expect to get two rectangles (A and C), both having a rectangle "group" inside of them, the "group" inside of A holding another rectangle B, and C having a rectangle "group" with another rectangle "D" inside.

But what I get is this, where D is inside the group of A

PlantUML diagram

Is this desired behaviour? When adding aliases for "group" everything works as expected:

@startuml
rectangle "A" {
  rectangle "group" as g1 {
    rectangle "B"
  }
}

rectangle "C " {
  rectangle "group" as g2 {
    rectangle "D"
  }
}
@enduml

 PlantUML diagram

I've used the online server to test this behaviour and created the pictures there.

1 Answer

0 votes
answered Feb 12, 2025 by The-Lu (86,400 points)

Hello C.,

For that you use:

set separator .

See similar request here:

Enjoy,
Regards,
Th.

...