How do you add a link to multiline component?

0 votes
asked Jul 11, 2018 in Question / help by Ken

In a component diagram I can add a link to a component like so:

package MyPackage {

component "My Component" [[http://www.some.link]]

}

But how do I do it for a component with a longer description? This produces a syntax error (using version version 1.2018.08):

package MyPackage {

component MyComponent [
This one has
a very long
description
[[http://www.google.com]]
]
}

While this succeeds, but does not render the link:

package MyPackage {

component MyComponent [
This one has
a very long
description
] [[http://www.google.com]]

}

Here's an online demo of the above. Any clue how to do this? 

2 Answers

+1 vote
answered Jul 13, 2018 by Serge Wenger Work (15,620 points)

Hello,

One of the disadvantages of plantUML is that it is sensitive to line breaks. You must write:

@startuml
package MyPackage {

component MyComponent [
This one has
a very long
description
[[http://www.google.com]]]
}
@enduml

0 votes
answered Jul 20, 2018 by plantuml (295,000 points)

In last beta http://beta.plantuml.net/plantuml.jar the following syntax is also possible:

@startuml
package MyPackage {

component MyComponent [[http://www.google.com]] [
This one has
a very long
description
]

}
@enduml

...