hi there
made some observations with nested macros; maybe someone could explain:
1. why do i get the macro error?
var s = createSkin('<% param.foo default=<% param.bar %> %>');
renderSkin(s, {foo: 1, bar: 2});
=> 1
renderSkin(s, {foo: null, bar: 2});
=> [Macro error in param.foo: java.lang.Integer]
2. why isn't "bar" titleized, but "foo" is always?
var s = createSkin('<% param.foo | titleize %>');
renderSkin(s, {foo: "foo", bar: "bar"});
=> Foo
var s = createSkin('<% param.foo default=<% param.bar %> | titleize %>');
renderSkin(s, {foo: null, bar: "bar"});
=> bar
// even worse:
var s = createSkin('<% param.foo prefix=<% param.bar %> | titleize %>');
renderSkin(s, {foo: "foo", bar: "bar"});
=> barFoo
(i think the filter should be applied after prefix / default have been applied.)
ciao,
tobi
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.