Closed
Bug 492647
Opened 17 years ago
Closed 17 years ago
Attachment reminder should .test, not .exec
Categories
(Thunderbird :: Message Compose Window, defect)
Thunderbird
Message Compose Window
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: philor, Assigned: philor)
References
Details
Attachments
(1 file)
|
1.08 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
re.exec() returns an array of the matches, which is particularly uninteresting when the re is "attached" and thus the array is ["attached"]. Since all we want is matched/didn't, .test() is perfect for us.
Attachment #377006 -
Flags: review?(mkmelin+mozilla)
There is also bug 492438 though, requesting the list of matches to be displayed to the user in the dialog for information what triggered it.
| Assignee | ||
Comment 2•17 years ago
|
||
matchedWords += keywordsArray[i] + " ";
Reporting what matched only requires .exec() in the unlikely case that we embrace input-as-regexp and want to tell people what word was matched by their "attach(ed|ment)\s(?!to)" (and even then, I'm not quite sure that reporting the match rather than the regexp that hit would be the right thing).
Comment 3•17 years ago
|
||
Comment on attachment 377006 [details] [diff] [review]
Fix
Looks good. It's simple to change as appropriate in the future if needed. r=mkmelin
Attachment #377006 -
Flags: review?(mkmelin+mozilla) → review+
Updated•17 years ago
|
Target Milestone: --- → Thunderbird 3.0b3
| Assignee | ||
Comment 4•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•