1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Mobile: Fixes #1082: Highlight correct keywords when doing a search

This commit is contained in:
Laurent Cozic
2018-12-29 18:24:02 +01:00
parent 5a00214fd2
commit f308fe71f9
4 changed files with 63 additions and 20 deletions

View File

@@ -108,7 +108,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) + '[^' + pregQuote(' \t\n\r,.,+-*?!={}<>|:"\'()[]') + ']' + '*';
regexString = regexString.substr(0, regexString.length - 2) + '.*?';
}
return regexString;