Re: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text

From: Date: Thu, 09 Dec 2004 17:40:35 +0000
Subject: Re: [pear-webmaster] [PEAR-BUG] Bug #2855 [Opn]: New bug linking system converts already linked text
References: 1 2 3 4  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-3528@lists.php.net to get a copy of this message
Anatoly: On Thu, Dec 09, 2004 at 02:36:37PM +0200, anatoly techtonik wrote: > - $text = preg_replace('/(?<!>)(bug|request)\s+#?([0-9]+)/i', > + $text = preg_replace('/(?<!>)(bug|request)\s*#?([0-9]+)' . '(?=(?>[^<]{0,100})(?!<\/a))/i', At one time the regex allowed no spaces between the word "bug" and the bug number. That lead to problems with some links being wrong, for example if a URI has "bug1234" in it. Not putting a space between the word and the number is an unusual way to file a bug report. So, in the rare case of a bug number not having the space between them, it won't be hyperlinked. Big deal. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.pear.webmaster (#3528) next »