1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00

Chore: Fixed GotoAnything handling of search keywords

This commit is contained in:
Laurent Cozic 2024-11-23 17:07:13 +00:00
parent e652db05e1
commit 54a82befa0

View File

@ -379,8 +379,10 @@ class DialogComponent extends React.PureComponent<Props, State> {
const keywordRegexes = (await this.keywords(searchQuery)).map(term => { const keywordRegexes = (await this.keywords(searchQuery)).map(term => {
if (typeof term === 'string') { if (typeof term === 'string') {
return new RegExp(escapeRegExp(term), 'ig'); return new RegExp(escapeRegExp(term), 'ig');
} else { } else if (term.valueRegex) {
return new RegExp(removeDiacritics(term.valueRegex), 'ig'); return new RegExp(removeDiacritics(term.valueRegex), 'ig');
} else {
return new RegExp(escapeRegExp(term.value), 'ig');
} }
}); });