You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
All: Fix text highlighting in basic search mode (#13703)
This commit is contained in:
@@ -474,6 +474,7 @@ describe('services/SearchEngine', () => {
|
||||
['"abcd efgh"', { _: ['abcd efgh'] }],
|
||||
['"abcd efgh" ijkl', { _: ['abcd efgh', 'ijkl'] }],
|
||||
['title:abcd title:efgh', { title: ['abcd', 'efgh'] }],
|
||||
['/abcd', { _: ['abcd'] }],
|
||||
];
|
||||
|
||||
for (let i = 0; i < testCases.length; i++) {
|
||||
|
||||
@@ -544,6 +544,10 @@ export default class SearchEngine {
|
||||
|
||||
let allTerms: Term[] = [];
|
||||
|
||||
if (query.length && query[0] === '/') {
|
||||
query = query.substring(1);
|
||||
}
|
||||
|
||||
try {
|
||||
allTerms = filterParser(query);
|
||||
} catch (error) {
|
||||
|
||||
@@ -20,7 +20,6 @@ export default class SearchEngineUtils {
|
||||
|
||||
let searchType = SearchEngine.SEARCH_TYPE_FTS;
|
||||
if (query.length && query[0] === '/') {
|
||||
query = query.substr(1);
|
||||
searchType = SearchEngine.SEARCH_TYPE_BASIC;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user