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);
$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);