Closed claudio-rosati closed 5 years ago
In the current implementation, the default value cannot itself be another macro. I'll have to update the macro handling to support that.
Personally I don't know if it's worth. I think that even if you implement it, someone else will soon or later come up with
${MACRO=${other_MACRO=${further_MACRO}}}
and so on. I leave to you the decision. If we'll go for constant value only, I'll tell our integrator that this is. Maybe we should update the HTML documentation in any case.
Yes, never misunderestimate people's creativity.
I'll update it anyway because of this:
// XXX Replace pattern with code.
// This pattern is too complicated,
// and it doesn't allow braces inside the default value.
private static final Pattern spec = Pattern
.compile("(?<!\\\\)\\$\\((" + Macros.MACRO_NAME_PATTERN + ")((\\s*=\\s*)[^)]*)?\\)" +
"|" +
"(?<!\\\\)\\$\\{(" + Macros.MACRO_NAME_PATTERN + ")((\\s*=\\s*)[^}]*)?\\}");
There's one \
too many in that for me to understand what's going on.
$(MACRO=$(other_MACRO))
works now.
Thank you very much.
This is also true if
${MACRO=${other_MACRO}}
is used (and and extra } will result.CSSTUDIO-970.zip