Fix Attachment Content regexp search
This commit is contained in:
parent
61864e903f
commit
6952f46986
1 changed files with 8 additions and 2 deletions
|
@ -575,8 +575,14 @@ Zotero.Fulltext = new function(){
|
|||
flags += 'i';
|
||||
}
|
||||
|
||||
var re = new RegExp(searchText, flags);
|
||||
var matches = re(str);
|
||||
try {
|
||||
var re = new RegExp(searchText, flags);
|
||||
var matches = re.exec(str);
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug(e, 1);
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
if (matches){
|
||||
Zotero.debug("Text found");
|
||||
return str.substr(matches.index, 50);
|
||||
|
|
Loading…
Reference in a new issue