From 84d22046d4b959417b75c881822ae09fc4938a77 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 11 Jan 2020 19:38:41 +1000 Subject: [PATCH] fix type:cloze handling --- rslib/src/template_filters.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/template_filters.rs b/rslib/src/template_filters.rs index 19951ba57..750597fa7 100644 --- a/rslib/src/template_filters.rs +++ b/rslib/src/template_filters.rs @@ -22,7 +22,7 @@ pub(crate) fn apply_filters<'a>( let mut text: Cow = text.into(); // type:cloze is handled specially - let filters = if filters == ["type", "cloze"] { + let filters = if filters == ["cloze", "type"] { &["type-cloze"] } else { filters @@ -319,7 +319,7 @@ foo "[[type:cloze:Front]]" ); assert_eq!( - apply_filters("ignored", &["type", "cloze"], "Text"), + apply_filters("ignored", &["cloze", "type"], "Text"), ("[[type:cloze:Text]]".into(), vec![]) ); }