Fix ordinal case in write_template

Internal card ordinals start at 0, so add 1 again when writing a
template search string from a parsed ordinal.
This commit is contained in:
RumovZ 2021-01-09 17:30:12 +01:00
parent 8c6d0e6229
commit ca62f3ef80

View file

@ -149,7 +149,7 @@ fn write_single_field(field: &str, text: &str, is_re: bool) -> String {
fn write_template(template: &TemplateKind) -> String {
match template {
TemplateKind::Ordinal(u) => format!("\"card:{}\"", u),
TemplateKind::Ordinal(u) => format!("\"card:{}\"", u + 1),
TemplateKind::Name(s) => format!("\"card:{}\"", s),
}
}