You've already forked joplin
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:
23
ReactNativeClient/lib/models/Search.js
Normal file
23
ReactNativeClient/lib/models/Search.js
Normal 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;
|
Reference in New Issue
Block a user