plantuml / plantuml-stdlib

Contains official Standard Library for PlantUML
557 stars 122 forks source link

C4-Plantuml: double ** when adding a \n in Rel text #61

Closed dgutson closed 1 year ago

dgutson commented 2 years ago

consider

@startuml
title SS - Containers

top to bottom direction

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

System_Boundary("SS_boundary", "SS") {
  Container(SS.Container1, "Container1", "", $tags="")
  Container(SS.Container2, "Container2", "", $tags="")
}

Rel_D(SS.Container1, SS.Container2, "Relation1\nRelation2", $tags="")

SHOW_LEGEND()
@enduml

This is the output: image

Please note the double * because of the \n.

Potherca commented 2 years ago

This is a bug in the plantuml-stdlib/C4-PlantUML project.

I have created an issue addressing this bug there: https://github.com/plantuml-stdlib/C4-PlantUML/issues/255

dgutson commented 2 years ago

Thanks @Potherca

kirchsth commented 1 year ago

This issue is fixed with C4-PlantUML v.2.5.0; C4-PlantUML v.2.5.0 is included in latest PlantUML v1.2022.15 beta1 too https://github.com/plantuml/plantuml-stdlib/pull/67

E.g. you can test it via PlantUML web service

@startuml
!include <C4/C4_Container.puml>

System_Boundary("SS_boundary", "SS") {
  Container(SS.Container1, "Container1", "", $tags="")
  Container(SS.Container2, "Container2", "", $tags="")
}

Rel_D(SS.Container1, SS.Container2, "Relation1\nRelation2", $tags="")

SHOW_LEGEND()
@enduml

BR Helmut

kirchsth commented 1 year ago

v1.2022.15 + *.16 is already released, I think it can be closed