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
ccbeca71
Commit
ccbeca71
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
bcb9385d
Show 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 @
ccbeca71
...
...
@@ -522,8 +522,10 @@ sub possible_duplicates {
my
$dbh
=
Bugzilla
->
dbh
;
my
$user
=
Bugzilla
->
user
;
my
@words
=
split
(
/[\b\s]+/
,
$short_desc
||
''
);
# Exclude punctuation from the array.
@words
=
map
{
/(\w+)/
;
$1
}
@words
;
# Remove leading/trailing punctuation from words
foreach
my
$word
(
@words
)
{
$word
=~
s/(?:^\W+|\W+$)//g
;
}
# And make sure that each word is longer than 2 characters.
@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