nesting more than three levels and using as "..." and using 'allowmixing' breaks things

0 votes
asked Dec 6, 2023 in Bug by anonymous
Code:

@startuml

allowmixing

rectangle outer as "o" {
   component middle as "m" {
       node inner as "i"
   }
}

@enduml

Results in an error pointing to node inner as "i".

However, if I remove either 'allowmixing' or 'as "i"', things work out. It also doesn't matter, what types of nodes are used.

This is on PlantUML version 1.2023.12 (Fri Oct 20 15:49:54 CEST 2023) OpenJDK 21, MacOS

1 Answer

0 votes
answered Dec 6, 2023 by The-Lu (70,400 points)

Hello A., and all,

Here is a workaround using the normal form of alias, as:

@startuml

allowmixing

'class c

rectangle "outer" as o {
   component "middle" as m {
       node "inner" as i
   }
}

@enduml

Regards,
Th.

commented Dec 6, 2023 by The-Lu (70,400 points)

Or use explicitly empty node as:

@startuml

allowmixing

rectangle outer as "o" {
   component middle as "m" {
       node inner as "i" {
       }
   }
}

@enduml

Regards,
Th.

...