iliaa           Fri Jul 30 11:16:29 2004 EDT

  Modified files:              
    /livedocs   livedoc_funcs.php style_mapping.php 
  Log:
  Fixes and tune-ups by Nuno Lopes.
  
  
http://cvs.php.net/diff.php/livedocs/livedoc_funcs.php?r1=1.8&r2=1.9&ty=u
Index: livedocs/livedoc_funcs.php
diff -u livedocs/livedoc_funcs.php:1.8 livedocs/livedoc_funcs.php:1.9
--- livedocs/livedoc_funcs.php:1.8      Wed May 26 11:57:28 2004
+++ livedocs/livedoc_funcs.php  Fri Jul 30 11:16:29 2004
@@ -314,7 +314,7 @@
  * and generate a link to its node using its title */
 function make_function_link($ref) 
 {
-       $parts = explode('.', $ref);
+       $parts = explode('.', strtolower($ref));
 
        $stag = 'function';
        $etag = 'function';
http://cvs.php.net/diff.php/livedocs/style_mapping.php?r1=1.18&r2=1.19&ty=u
Index: livedocs/style_mapping.php
diff -u livedocs/style_mapping.php:1.18 livedocs/style_mapping.php:1.19
--- livedocs/style_mapping.php:1.18     Wed May 26 11:40:04 2004
+++ livedocs/style_mapping.php  Fri Jul 30 11:16:29 2004
@@ -18,7 +18,7 @@
 // | Helper functions for formatting elements                             |
 // +----------------------------------------------------------------------+
 //
-// $Id: style_mapping.php,v 1.18 2004/05/26 15:40:04 wez Exp $
+// $Id: style_mapping.php,v 1.19 2004/07/30 15:16:29 iliaa Exp $
 
 // almost XPATH.. ;-)
 $map = array(
@@ -296,7 +296,7 @@
 
        $link = str_replace('_', '-', $matches[1]);
        $link = WEBBASE . (FORCE_DYNAMIC ? "?l=$lang&q=function.$link" : 
"$lang/function.$link.html");
-       return '<a class="phpfunc" href="' . $link . '">' . $matches[1] . '</a>(';
+       return '<a class="phpfunc" href="' . $link . '">' . $matches[1] . 
'</a></span>' . $matches[2];
 }
 
 function format_listing($node) 
@@ -312,33 +312,27 @@
        switch ($node->attributes['role']) {
                case 'asp':
                case 'php':
-// Small hack because highlight_string has changed its behaviour in PHP 5 RC1
-                       if (version_compare(phpversion(), '5.0.0RC1') == -1){
-                               $content = preg_replace(array(
-                                       '@<br />@',
-                                       '@<font color="([^"]+)">@',
-                                       '@</font>@',
-                                       ),
-                                       array(
-                                       "<br />\n",
-                                       '<span class="\\1">',
+                       $content = str_replace(
+                               array(
+                                       '&nbsp;',
+                                       '<font color="',        // for PHP 4
+                                       '<span style="color: ', // for PHP 5.0.0RC1
+                                       '</font>',
+                                       "\n ",
+                                       '  '
+                               ),
+                               array(
+                                       ' ',
+                                       '<span class="',
+                                       '<span class="',
                                        '</span>',
-                                       ),
-                                       highlight_string($content, 1));
-                       } else {
-                               $content = preg_replace(array(
-                                       '@<br />@',
-                                       '@<span style="color: ([^"]+)">@',
-                                       '@</span>@',
-                                       ),
-                                       array(
-                                       "<br />\n",
-                                       '<span class="\\1">',
-                                       '</span>',
-                                       ),
-                                       highlight_string($content, 1));
-                       }
-                       $content = 
preg_replace_callback('{([\w_]+)(\s*</span>)(\s*<span\s+class="keyword">\s*\()}m', 
'format_listing_hyperlink_function', $content);
+                                       "\n&nbsp;",
+                                       ' &nbsp;'
+                               ),
+                               highlight_string($content, true)
+                       );
+
+                       $content = 
preg_replace_callback('{([\w_]+)\s*</span>(\s*<span\s+class="keyword">\s*\()}m', 
'format_listing_hyperlink_function', $content);
                        break;
                case 'shell':
                case 'html':

Reply via email to