Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
2cc8fe72
Commit
2cc8fe72
authored
Jan 07, 2010
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 514703 - revert changes to bug link detection algorithm. r,a=LpSolit
parent
8055714d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
Template.pm
Bugzilla/Template.pm
+4
-9
No files found.
Bugzilla/Template.pm
View file @
2cc8fe72
...
...
@@ -156,11 +156,6 @@ sub quoteUrls {
my
$chr1
=
chr
(
1
);
$text
=~
s/\0/$chr1\0/g
;
# If the comment is already wrapped, we should ignore newlines when
# looking for matching regexps. Else we should take them into account.
my
$s
=
(
$comment
&&
$comment
->
already_wrapped
)
?
qr/\s/
:
qr/[[:blank:]]/
;
# However, note that adding the title (for buglinks) can affect things
# In particular, attachment matches go before bug titles, so that titles
# with 'attachment 1' don't double match.
...
...
@@ -230,7 +225,7 @@ sub quoteUrls {
~<
a
href
=\
"mailto:$2\">$1$2</a>~igx;
# attachment links
$text =~ s~\b(attachment
$s*\#?$
s*(\d+))
$text =~ s~\b(attachment
\s*\#?\
s*(\d+))
~($things[$count++] = get_attachment_link($2, $1)) &&
("
\
0
\
0
" . ($count-1) . "
\
0
\
0
")
~egmxi;
...
...
@@ -243,9 +238,9 @@ sub quoteUrls {
# Also, we can't use $bug_re?$comment_re? because that will match the
# empty string
my $bug_word = get_text('term', { term => 'bug' });
my $bug_re = qr/\Q$bug_word\E
$s*\#?$
s*(\d+)/i;
my $comment_re = qr/comment
$s*\#?$
s*(\d+)/i;
$text =~ s~\b($bug_re(?:
$s*,?$
s*$comment_re)?|$comment_re)
my $bug_re = qr/\Q$bug_word\E
\s*\#?\
s*(\d+)/i;
my $comment_re = qr/comment
\s*\#?\
s*(\d+)/i;
$text =~ s~\b($bug_re(?:
\s*,?\
s*$comment_re)?|$comment_re)
~ # We have several choices. $1 here is the link, and $2-4 are set
# depending on which part matched
(defined($2) ? get_bug_link($2, $1, { comment_num => $3 }) :
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment