Re[2]: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text
| From: | anatoly techtonik | Date: | Thu, 09 Dec 2004 12:36:37 +0000 |
| Subject: | Re[2]: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text | ||
| References: | 1 2 3 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-3527@lists.php.net to get a copy of this message | ||
Hello Pierre-Alain,
From Thursday, December 9, 2004, 2:18:21 PM, you wrote:
PAJ> Hello,
PAJ> Please use a .txt extension. Any other will be droped.
Here you are.
t
--
--- pear-format-html_old.php 2004-12-09 04:17:40.000000000 +0200 +++ pear-format-html.php 2004-12-09 14:03:26.000000000 +0200 @@ -1055,10 +1055,10 @@ */ function make_ticket_links($text) { - $text = preg_replace('/(?<=php)\s*(bug|request)\s+#?([0-9]+)/i', + $text = preg_replace('/(?<=php)\s*(bug|request)\s*#?([0-9]+)(?=(?>[^<]{0,100})(?!<\/a))/i', ' <a href="http://bugs.php.net/\\2">\\1 \\2</a>', $text); - $text = preg_replace('/(?<!>)(bug|request)\s+#?([0-9]+)/i', + $text = preg_replace('/(?<!>)(bug|request)\s*#?([0-9]+)(?=(?>[^<]{0,100})(?!<\/a))/i', '<a href="/bugs/\\2">\\0</a>', $text); return $text; }
--- pear-format-html_old.php 2004-12-09 04:17:40.000000000 +0200 +++ pear-format-html.php 2004-12-09 14:03:26.000000000 +0200 @@ -1055,10 +1055,10 @@ */ function make_ticket_links($text) { - $text = preg_replace('/(?<=php)\s*(bug|request)\s+#?([0-9]+)/i', + $text = preg_replace('/(?<=php)\s*(bug|request)\s*#?([0-9]+)(?=(?>[^<]{0,100})(?!<\/a))/i', ' <a href="http://bugs.php.net/\\2">\\1 \\2</a>', $text); - $text = preg_replace('/(?<!>)(bug|request)\s+#?([0-9]+)/i', + $text = preg_replace('/(?<!>)(bug|request)\s*#?([0-9]+)(?=(?>[^<]{0,100})(?!<\/a))/i', '<a href="/bugs/\\2">\\0</a>', $text); return $text; }