second keyword argument with comma not working

0 votes
asked Dec 28, 2020 in Bug by kirchsth (600 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

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

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

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

Thank you for your support, best regards

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 (600 points)
Thank you for clarification, I didn’t know that spaces are relevant (in context of keyword arguments) too.

Best regards

1 Answer

0 votes
answered Jan 4 by plantuml (241,480 points)
Still, this behavior was not perfect... This should be fixed in last beta and on the online server.

Tell us if you find other issues !

commented Jan 4 by kirchsth (600 points)
Thank you for the fast fix
Best regards