PHP bugs syntax highlighting

From: Date: Fri, 12 Dec 2003 18:08:38 +0000
Subject: PHP bugs syntax highlighting
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-22520@lists.php.net to get a copy of this message
Can be bug reports on http://bugs.php.net/ syntax highlighted? I'm sending a diff for it. Jakub Vrana

Index: bug.php =================================================================== RCS file: /repository/php-bugs-web/bug.php,v retrieving revision 1.54 diff -u -r1.54 bug.php --- bug.php 8 Dec 2003 16:56:57 -0000 1.54 +++ bug.php 12 Dec 2003 17:58:51 -0000 @@ -485,10 +485,10 @@ echo "<div class=\"comment\">"; echo "<b>[",format_date($ts),"] ", htmlspecialchars(spam_protect($email)), "</b>\n"; echo ($edit == 1 && $com_id !== 0 && in_array($user, $trusted_developers)) ? "<a href=\"$PHP_SELF?id=$id&amp;edit=1&amp;delete_comment=$com_id\">[delete]</a>\n" : ''; - echo "<pre class=\"note\">"; + echo "<div class=\"note\">"; $note = addlinks(preg_replace("/(\r?\n){3,}/","\n\n",wordwrap($comment,72,"\n",1))); echo preg_replace('/(bug\ *#([0-9]+))/i', "<a href=\"$PHP_SELF?id=\\2\">\\1</a>", $note); - echo "</pre>\n"; + echo "</div>\n"; echo "</div>"; } Index: style.css =================================================================== RCS file: /repository/php-bugs-web/style.css,v retrieving revision 1.19 diff -u -r1.19 style.css --- style.css 18 Jan 2003 21:24:49 -0000 1.19 +++ style.css 12 Dec 2003 17:58:51 -0000 @@ -37,7 +37,7 @@ font-size: 90%; } -pre.note { +div.note { margin-left: 20px; } Index: include/functions.inc =================================================================== RCS file: /repository/php-bugs-web/include/functions.inc,v retrieving revision 1.103 diff -u -r1.103 functions.inc --- include/functions.inc 4 Nov 2003 05:58:47 -0000 1.103 +++ include/functions.inc 12 Dec 2003 17:58:51 -0000 @@ -432,8 +432,8 @@ function addlinks($text) { - $text = htmlspecialchars($text); - $text = preg_replace("/((mailto|http|ftp|nntp|news):.+?)(&gt;|\\s|\\)|\\.\\s|$)/i","<a href=\"\\1\">\\1</a>\\3",$text); + $text = highlight_string($text, true); + $text = preg_replace("/((mailto|http|ftp|nntp|news):.+?)(&gt;|\\s|[,)<]|\\.\\s|$)/i","<a href=\"\\1\">\\1</a>\\3",$text); # what the heck is this for? $text = preg_replace("/[.,]?-=-\"/", '"', $text); return $text;
« previous php.mirrors (#22520) next »