// do not allow nested functions..?
$fstart = -1;
$indent = 1;
-
+ $inscript = false;
$ret = &$out;
foreach($ar as $item) {
$in = str_repeat(" ", $indent);
case (!strlen($item)):
continue;
- if ($inscript && ($item != '{end:}')) {
+ case ($inscript && ($item != '{end:}')):
$ret[] = $item;
- }
- if ($inscript && ($item == '{end:}')) {
+ continue;
+
+ case ($inscript && ($item == '{end:}')):
$inscript = false;
-
- }
+ continue;
+
case ($item[0] != '{'):
if (!strlen(trim($item))) {
continue;