second keyword argument with comma not working

0 votes
asked Dec 28, 2020 in Bug by kirchsth (1,570 points)

Hello PlantUML team, after some tests I observed this issue:

If I call a procedure and the arg3 has a comma then it fails. Arg2 can have one

@startuml
!unquoted procedure Node($alias, $arg2 = "", $arg3 = "")
rectangle "$alias" <<node>> as $alias
!endprocedure

Node(Arg2WithCommaOK, $arg2 = "a,b", $arg3="tagA1 tagA2"){
  rectangle r1
}

Node(Arg3WithcommaNOK, $arg2 = "a,b", $arg3="tagA1,tagA2"){
  rectangle r2
}
@enduml

Thank you for your support, best regards
Helmut

commented Dec 28, 2020 by Martin

I wouldn't say Arg2 is working as expected either.  Note that it is only accepted because you have a space before the "=", and it drags the variable name into the value and truncates at the comma.  Check out these 4 combos for arg2 :

1) $arg2="ab" - works as expected i.e. value: ab

2) $arg2 ="ab" (note space before =) value: $arg2 ="ab"

3) $arg2 ="a,b" (note space before =) value:$arg2 ="a (note truncation at comma, although amazingly arg3 is unaffected.)

4) $arg2="a,b" abends

commented Dec 28, 2020 by kirchsth (1,570 points)
Thank you for clarification, I didn’t know that spaces are relevant (in context of keyword arguments) too.

Best regards
Helmut

1 Answer

0 votes
answered Jan 4 by plantuml (257,900 points)
selected Jun 17 by kirchsth
 
Best answer
Still, this behavior was not perfect... This should be fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server.

Tell us if you find other issues !

Thanks
commented Jan 4 by kirchsth (1,570 points)
Thank you for the fast fix
Best regards
Helmut
...