Why can't spaces appear in the title of the parent component

0 votes
asked Mar 23, 2023 in Question / help by anonymous
edited Mar 23, 2023

Hello.

When I try to name a nested component using a string with spaces, it reports an error.

the code is below.

```

@startuml
component [Immune Receptor Networks] as IR_net {
    component [PRRs] as CS_ir 
}
@enduml

```

https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhEpot8pqlDAr68zipDBSrBLGXAJKujACalKl1BBIdFByekZbL8B5Rm38hFIorHgEPI008aJG51GH05pi7ncKKANBLS3gbvAK2J0G00

1 Answer

0 votes
answered Mar 23, 2023 by evantill (480 points)
 
Best answer
Hi,

Try this syntax :

@startuml
component comp1 [
This component has spaces
]
@enduml
commented Mar 23, 2023 by anonymous

Thanks for your reply.

For non-nested components, this works. However, how do I turn comp1 into a nested component?

https://www.plantuml.com/plantuml/uml/HSon2i9G34RXFK_nFqh1gOj874iffMOGJN99Sd4GtzsxzUpdcxBsgAvlEboRcrXXvisai10mgtOJi1pIoWDNgO_7Asa5VGcZSrjkpBbYJrpkspD0Fvh47iF-0m00

commented Mar 23, 2023 by evantill (480 points)
@startuml
component "Immune Receptor Networks"  {

    component "other component"
}
@enduml
commented Mar 23, 2023 by anonymous
It works! Thanks!
...