mirror of https://github.com/laurent22/joplin.git
pull/4209/head
parent
3e21e9a334
commit
92b4795410
|
@ -511,4 +511,17 @@ describe('services_SearchEngine', function() {
|
|||
expect((await engine.search('"- [ ]"', { searchType: SearchEngine.SEARCH_TYPE_BASIC })).length).toBe(1);
|
||||
expect((await engine.search('"[ ]"', { searchType: SearchEngine.SEARCH_TYPE_BASIC })).length).toBe(2);
|
||||
}));
|
||||
|
||||
it('should not mistake cyrillic "l" for latin "n"', (async () => {
|
||||
const n1 = await Note.save({ title: 'latin n', body: 'n' });
|
||||
const n2 = await Note.save({ title: 'cyrillic l', body: 'л' });
|
||||
|
||||
await engine.syncTables();
|
||||
|
||||
expect((await engine.search('n')).length).toBe(1);
|
||||
expect((await engine.search('n'))[0].id).toBe(n1.id);
|
||||
|
||||
expect((await engine.search('л')).length).toBe(1);
|
||||
expect((await engine.search('л'))[0].id).toBe(n2.id);
|
||||
}));
|
||||
});
|
||||
|
|
|
@ -1852,11 +1852,6 @@
|
|||
"integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
|
||||
"dev": true
|
||||
},
|
||||
"diacritics": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz",
|
||||
"integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E="
|
||||
},
|
||||
"diff-match-patch": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz",
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"chokidar": "^3.4.3",
|
||||
"color": "3.1.2",
|
||||
"compare-versions": "^3.6.0",
|
||||
"diacritics": "^1.3.0",
|
||||
"diff-match-patch": "^1.0.4",
|
||||
"es6-promise-pool": "^2.5.0",
|
||||
"file-uri-to-path": "^1.0.0",
|
||||
|
|
|
@ -4,8 +4,7 @@ const Setting = require('../../models/Setting').default;
|
|||
const Note = require('../../models/Note.js');
|
||||
const BaseModel = require('../../BaseModel').default;
|
||||
const ItemChangeUtils = require('../ItemChangeUtils');
|
||||
const { pregQuote, scriptType } = require('../../string-utils.js');
|
||||
const removeDiacritics = require('diacritics').remove;
|
||||
const { pregQuote, scriptType, removeDiacritics } = require('../../string-utils.js');
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const filterParser = require('./filterParser').default;
|
||||
const queryBuilder = require('./queryBuilder').default;
|
||||
|
|
Loading…
Reference in New Issue