equal
deleted
inserted
replaced
52 $template_regex = "/\{\{(.+)((\n|\|[ ]*([A-z0-9]+)[ ]*=[ ]*(.+))*)\}\}/isU"; |
52 $template_regex = "/\{\{(.+)((\n|\|[ ]*([A-z0-9]+)[ ]*=[ ]*(.+))*)\}\}/isU"; |
53 $i = 0; |
53 $i = 0; |
54 while ( preg_match($template_regex, $text, $match) ) |
54 while ( preg_match($template_regex, $text, $match) ) |
55 { |
55 { |
56 $i++; |
56 $i++; |
|
57 // we can go up to 5 levels of templates deep |
57 if ( $i == 5 ) |
58 if ( $i == 5 ) |
58 break; |
59 break; |
59 $text = RenderMan::include_templates($text); |
60 $text = RenderMan::include_templates($text); |
60 } |
61 } |
|
62 |
|
63 //header('Content-type: text/plain'); |
|
64 //die($text); |
61 |
65 |
62 return array(); |
66 return array(); |
63 } |
67 } |
64 |
68 |
65 public function heading(&$text) |
69 public function heading(&$text) |