mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
fix type:cloze handling
This commit is contained in:
parent
a51a4e4d31
commit
84d22046d4
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ pub(crate) fn apply_filters<'a>(
|
||||||
let mut text: Cow<str> = text.into();
|
let mut text: Cow<str> = text.into();
|
||||||
|
|
||||||
// type:cloze is handled specially
|
// type:cloze is handled specially
|
||||||
let filters = if filters == ["type", "cloze"] {
|
let filters = if filters == ["cloze", "type"] {
|
||||||
&["type-cloze"]
|
&["type-cloze"]
|
||||||
} else {
|
} else {
|
||||||
filters
|
filters
|
||||||
|
@ -319,7 +319,7 @@ foo</a>
|
||||||
"[[type:cloze:Front]]"
|
"[[type:cloze:Front]]"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
apply_filters("ignored", &["type", "cloze"], "Text"),
|
apply_filters("ignored", &["cloze", "type"], "Text"),
|
||||||
("[[type:cloze:Text]]".into(), vec![])
|
("[[type:cloze:Text]]".into(), vec![])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue