If I have a macro that inserts some string containing substring X and I call this macro from another macro that receives a parameter named with the same substring X, then the X from the calling macro is cascaded into the inner macro, and replaces the X substring by the X argument.
This example illustrates the problem:
!define FOO(c, i) <color:c>i</color>
!define BAR(color) FOO(color, sometext)
class something {
BAR(Red)
}
On the class attribute, this generates the string <Red:Red>sometext</Red> instead of the intended <color:Red>sometext</color> (which generates a red text: sometext).
This works as intended:
!define FOO(c, i) <color:c>i</color>
!define BAR(c) FOO(c, sometext)
class something {
BAR(Red)
}
PlantUML version 1.2017.20 (Mon Dec 11 17:57:05 CET 2017)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 9-Debian+0-9b181-4bpo91
Operating System: Linux
OS Version: 4.9.0-4-amd64
Default Encoding: UTF-8
Language: en
Country: US
Machine: Debian
PLANTUML_LIMIT_SIZE: 4096
Processors: 4
Max Memory: 826,277,888
Total Memory: 52,428,800
Free Memory: 45,253,920
Used Memory: 7,174,880
Thread Active Count: 1
The environment variable GRAPHVIZ_DOT has not been set
Dot executable is /usr/bin/dot
Dot version: dot - graphviz version 2.38.0 (20140413.2041)
Installation seems OK. File generation OK