Hi,
i have in my template: {$Date.Format(l Y/m/d)}, and the result is: {$Monday 2007/08/13}
I.e. the curly braces are in the output as well. I have noticed, each non-curly-braced replacement has a curly-braced replacement, except one, in SSViewer.php, so I have added this missing one:
--- SSViewer.php.orig 2007-07-31 09:40:06.000000000 +1200
+++ SSViewer.php 2007-08-13 13:48:43.000000000 +1200
@@ -195,6 +195,7 @@
'/{\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)}/' => '<?= {dlr}item->obj("\\1",null,true)->XML_val("\\2",null,true) ?>',
'/{\\$([A-Za-z_][A-Za-z0-9_]*)}/' => '<?= {dlr}item->XML_val("\\1",null,true) ?>\\2',
+ '/{\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)\\(([^),]+)\\)}/' => '<?= {dlr}item->obj("\\1")->XML_val("\\2",array("\\3"),true) ?>\\4',
'/\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)\\(([^),]+)\\)([^A-Za-z0-9]|$)/' => '<?= {dlr}item->obj("\\1")->XML_val("\\2",array("\\3"),true) ?>\\4',
'/\\$([A-Za-z_][A-Za-z0-9_]*)\\(([^),]+), *([^),]+)\\)([^A-Za-z0-9]|$)/' => '<?= {dlr}item->XML_val("\\1",array("\\2","\\3"),true) ?>\\4',
Btw. A comma in the argument: $Date.Format(l, Y/m/d)
causes an error. Is there any way, how to put the comma in the argument?
Btw2. Isn't this regexp replacing in the SSViewer a little bit complicated? What about some simple LL/LR parser?