Closed barbalion closed 9 years ago
What happens if you force the string to be rendered before applying the formats? Note that I changed s
to (s)
(parentheses is the "to string" operator in StringTemplate).
Lower(s) ::= <<
<(s); format="lower">
>>
Cap(s) ::= <<
<(s); format="cap">
>>
It works properly then!
Glad to hear that. :smile: :+1:
I'm fairly sure this is by design. The result of applying Lower()
to the string is a template, not a string. The cap
format was only defined for strings, so you needed to coerce the input before applying the format.
Test the code below ("lower" and "cap" string format assumed to be implemented). All templates work well but "cap" format is never applied.
Actual output:
Expected output (capitalized first letter):
Tested on 4.0.8.