mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-16 01:44:37 +00:00
word length limitation set to minimum 2
This commit is contained in:
parent
9198ec9a12
commit
c2828a31de
@ -33,7 +33,7 @@ const matchSomeWordsExactly = (str, boost = 2) => {
|
||||
const matchBeginningOfWords = (str) => {
|
||||
return str
|
||||
.split(' ')
|
||||
.filter((s) => s.length >= 3)
|
||||
.filter((s) => s.length >= 2)
|
||||
.map((s) => s + '*')
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ describe('queryString', () => {
|
||||
|
||||
describe('globbing for longer words', () => {
|
||||
it('globs words with more than three characters', () => {
|
||||
expect(queryString('a couple of words')).toContain('couple* words*')
|
||||
expect(queryString('a couple of words')).toContain('couple* of* words*')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user