mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Revert "Remove special treatment of tag:none"
This reverts commit 95285ef66d
.
This commit is contained in:
parent
3aebae9f13
commit
b8142d33c8
1 changed files with 4 additions and 0 deletions
|
@ -195,6 +195,9 @@ impl SqlWriter<'_> {
|
||||||
write!(self.sql, "false").unwrap();
|
write!(self.sql, "false").unwrap();
|
||||||
} else {
|
} else {
|
||||||
match text {
|
match text {
|
||||||
|
"none" => {
|
||||||
|
write!(self.sql, "n.tags = ''").unwrap();
|
||||||
|
}
|
||||||
"*" => {
|
"*" => {
|
||||||
write!(self.sql, "true").unwrap();
|
write!(self.sql, "true").unwrap();
|
||||||
}
|
}
|
||||||
|
@ -758,6 +761,7 @@ mod test {
|
||||||
vec![r"(?i).* o\S*n\*et%w%oth\Sre_e(::| ).*".into()]
|
vec![r"(?i).* o\S*n\*et%w%oth\Sre_e(::| ).*".into()]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
assert_eq!(s(ctx, "tag:none"), ("(n.tags = '')".into(), vec![]));
|
||||||
assert_eq!(s(ctx, "tag:*"), ("(true)".into(), vec![]));
|
assert_eq!(s(ctx, "tag:*"), ("(true)".into(), vec![]));
|
||||||
|
|
||||||
// state
|
// state
|
||||||
|
|
Loading…
Reference in a new issue