includes/render.php
changeset 1123 777f32ac6b7c
parent 1108 c1be67a50d81
child 1157 e154e8176700
--- a/includes/render.php	Sat Sep 26 15:14:15 2009 -0400
+++ b/includes/render.php	Sat Sep 26 15:21:51 2009 -0400
@@ -664,8 +664,11 @@
   
     $parser = is_string($tplcode) ? $template->makeParserText($tplcode) : false;
     
+    // allow blank urlname?
+    $repeater = have_blank_urlname_page() ? '*' : '+';
+    
     // stage 1 - links with alternate text
-    preg_match_all('/\[\[([^\[\]<>\{\}\|]+)\|(.+?)\]\]/', $text, $matches);
+    preg_match_all('/\[\[([^\[\]<>\{\}\|]' . $repeater . ')\|(.+?)\]\]/', $text, $matches);
     foreach ( $matches[0] as $i => $match )
     {
       list($page_id, $namespace) = RenderMan::strToPageID($matches[1][$i]);
@@ -674,7 +677,7 @@
     }
     
     // stage 2 - links with no alternate text
-    preg_match_all('/\[\[([^\[\]<>\{\}\|]+)\]\]/', $text, $matches);
+    preg_match_all('/\[\[([^\[\]<>\{\}\|]' . $repeater . ')\]\]/', $text, $matches);
     foreach ( $matches[0] as $i => $match )
     {
       list($page_id, $namespace) = RenderMan::strToPageID($matches[1][$i]);