Look for text like "bug 213" and make it a link to that bug...

This commit is contained in:
terry%netscape.com 1999-03-26 03:11:49 +00:00
Родитель 17cffb116d
Коммит 4fe3986212
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -49,7 +49,7 @@ sub quoteUrls {
my @things;
while ($text =~ s%((mailto:)?([\w\.\-\+\=]+\@\w+(?:\.\w+)+)\b|
(\b((?:$protocol):\S+[\w/])))%"##".$count."##"%exo) {
(\b((?:$protocol):\S+[\w/])))%"##$count##"%exo) {
my $item = $&;
$item = value_quote($item);
@ -64,6 +64,15 @@ sub quoteUrls {
$things[$count++] = $item;
}
while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) {
my $item = $&;
my $num = $2;
$item = value_quote($item); # Not really necessary, since we know
# there's no special chars in it.
my $base = Param('urlbase');
$item = qq{<A HREF="${base}show_bug.cgi?id=$num">$item</A>};
$things[$count++] = $item;
}
$text = value_quote($text);