Commit 3060da84 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by System Administrator

Perl fixes to Template.pm

parent 636607d5
......@@ -146,6 +146,12 @@ sub get_format {
# This has been rewritten to be faster, mainly by substituting 'as we go'.
# If you want to modify this routine, read the comments carefully
sub get_bug_link3 {
my ($bb, $bug, $linktext, $options) = @_;
my $t = get_bug_link($bug, $linktext, $options);
return "$bb$t";
}
sub quoteUrls {
my ($text, $bug, $comment, $user) = @_;
return $text unless $text;
......@@ -300,10 +306,10 @@ sub quoteUrls {
$bug_re = qr/\#$s*([0-9]+)/i;
#my $bug_ren = qr/\QTOG\E$s*\#?$s*([0-9]+)/i;
# hack: user prev comment_re
$text =~ s~($bug_re)
$text =~ s~([^&])($bug_re)
~ # We have several choices. $1 here is the link, and $2-4 are set
# depending on which part matched
get_bug_link($2, $1, { user => $user })
get_bug_link3($1, $3, $2, { user => $user })
~egx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment