fix type:cloze handling
This commit is contained in:
parent
a51a4e4d31
commit
84d22046d4
@ -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 New Issue
Block a user