File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Task } from '../../Task' ;
2
2
import { Field } from './Field' ;
3
3
import { FilterOrErrorMessage } from './Filter' ;
4
+ import { TextField } from './TextField' ;
4
5
5
6
/**
6
7
* Support the 'tag' and 'tags' search instructions.
@@ -24,15 +25,15 @@ export class TagsField extends Field {
24
25
if ( filterMethod === 'include' || filterMethod === 'includes' ) {
25
26
result . filter = ( task : Task ) =>
26
27
task . tags . find ( ( tag ) =>
27
- tag . toLowerCase ( ) . includes ( search . toLowerCase ( ) ) ,
28
+ TextField . stringIncludesCaseInsensitive ( tag , search ) ,
28
29
) !== undefined ;
29
30
} else if (
30
31
tagMatch [ 2 ] === 'do not include' ||
31
32
tagMatch [ 2 ] === 'does not include'
32
33
) {
33
34
result . filter = ( task : Task ) =>
34
35
task . tags . find ( ( tag ) =>
35
- tag . toLowerCase ( ) . includes ( search . toLowerCase ( ) ) ,
36
+ TextField . stringIncludesCaseInsensitive ( tag , search ) ,
36
37
) == undefined ;
37
38
} else {
38
39
result . error = 'do not understand query filter (tag/tags)' ;
You can’t perform that action at this time.
0 commit comments