pierre3 / PlantUmlClassDiagramGenerator

This is a generator to create a class-diagram of PlantUML from the C# source code.
MIT License
654 stars 129 forks source link

plantuml error due to a string variable containing curly brackets #34

Closed shiena closed 3 years ago

shiena commented 3 years ago

Perhaps plantuml is causing a parsing error if the {{ }} for the sub-diagram is only on one side.

see also

double opening curly brackets only

input source

class OpeningBracket {
    string str = @"
{{
";
}

puml converted by puml-gen

@startuml
class OpeningBracket {
    str : string = @"
{{
"
}
@enduml

error in plantuml

$ plantuml OpeningBracket.puml
Error line 2 in file: OpeningBracket.puml
Some diagram description contains errors

single closing curly bracket only

input source

class ClosingBracket {
    string str = @"
}
";
}

puml converted by puml-gen

@startuml
class ClosingBracket {
    str : string = @"
}
"
}
@enduml

error in plantuml

$ plantuml ClosingBracket.puml
Error line 5 in file: ClosingBracket.puml
Some diagram description contains errors