1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Improve search keyword highlighting

This commit is contained in:
Laurent Cozic
2019-01-17 19:01:35 +00:00
parent 8dc0b34fdc
commit 96cd56548e
9 changed files with 90 additions and 64 deletions

View File

@@ -226,8 +226,8 @@ class SearchEngine {
let regexString = pregQuote(term);
if (regexString[regexString.length - 1] === '*') {
// regexString = regexString.substr(0, regexString.length - 2) + '[^' + pregQuote(' \t\n\r,.,+-*?!={}<>|:"\'()[]') + ']' + '*';
regexString = regexString.substr(0, regexString.length - 2) + '.*?';
regexString = regexString.substr(0, regexString.length - 2) + '[^' + pregQuote(' \t\n\r,.,+-*?!={}<>|:"\'()[]') + ']' + '*?';
// regexString = regexString.substr(0, regexString.length - 2) + '.*?';
}
return regexString;