mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
Merge pull request #2863 from aignatov-bio/ai-sci-5037-update-regexp-for-smart-annotation
Update regexp for smart annotation [SCI-5037]
This commit is contained in:
commit
b6f038ff09
|
@ -106,10 +106,10 @@ var SmartAnnotation = (function() {
|
|||
}
|
||||
a = decodeURI('%C3%80');
|
||||
y = decodeURI('%C3%BF');
|
||||
regexp = new RegExp(cleanedFlag + `([A-Za-z${a}-${y}0-9_/:\\s+-]*)$|${cleanedFlag}([^\\x00-\\xff]*)$`, 'gi');
|
||||
regexp = new RegExp(`${cleanedFlag}$|${cleanedFlag}(\\S[A-Za-z${a}-${y}0-9_/:\\s+-]*)$|${cleanedFlag}(\\S[^\\x00-\\xff]*)$`, 'gi');
|
||||
match = regexp.exec(subtext);
|
||||
if (match) {
|
||||
return match[2] || match[1];
|
||||
return match[1] || '';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue