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
f4c9234a
Commit
f4c9234a
authored
Feb 11, 2014
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 970184: "possible duplicates" shouldn't truncate words at the first non-word character
r=dkl, a=glob
parent
c5b78d99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Bug.pm
Bugzilla/Bug.pm
+4
-2
No files found.
Bugzilla/Bug.pm
View file @
f4c9234a
...
@@ -511,8 +511,10 @@ sub possible_duplicates {
...
@@ -511,8 +511,10 @@ sub possible_duplicates {
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$user
=
Bugzilla
->
user
;
my
$user
=
Bugzilla
->
user
;
my
@words
=
split
(
/[\b\s]+/
,
$short_desc
||
''
);
my
@words
=
split
(
/[\b\s]+/
,
$short_desc
||
''
);
# Exclude punctuation from the array.
# Remove leading/trailing punctuation from words
@words
=
map
{
/(\w+)/
;
$1
}
@words
;
foreach
my
$word
(
@words
)
{
$word
=~
s/(?:^\W+|\W+$)//g
;
}
# And make sure that each word is longer than 2 characters.
# And make sure that each word is longer than 2 characters.
@words
=
grep
{
defined
$_
and
length
(
$_
)
>
2
}
@words
;
@words
=
grep
{
defined
$_
and
length
(
$_
)
>
2
}
@words
;
...
...
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