1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron: Resolves #144, Resolves #311: Highlight search results and search in real time. Associated Ctrl+F with searching.

This commit is contained in:
Laurent Cozic
2018-03-19 23:04:48 +00:00
parent d5c2982093
commit 67608e29c8
15 changed files with 360 additions and 71 deletions

View File

@ -0,0 +1,23 @@
const BaseModel = require('lib/BaseModel.js');
const Note = require('lib/models/Note.js');
class Search extends BaseModel {
static tableName() {
throw new Error('Not using database');
}
static modelType() {
return BaseModel.TYPE_SEARCH;
}
static keywords(query) {
let output = query.trim();
output = output.split(/[\s\t\n]+/);
output = output.filter(o => !!o);
return output;
}
}
module.exports = Search;