From: Ian Jackson Date: Sat, 14 May 2022 14:11:06 +0000 (+0100) Subject: shapelib: magic: Actually substitute _colour in the template X-Git-Tag: otter-1.1.0~186 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3136db2465b599fe66b5643d7e4bf4a85a5495ce;p=otter.git shapelib: magic: Actually substitute _colour in the template This doesn't actually work because _colour appears multiple times and subst insists on it being there only once. Signed-off-by: Ian Jackson --- diff --git a/src/shapelib.rs b/src/shapelib.rs index 84c25b8d..4de0d671 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -1247,6 +1247,7 @@ fn process_files_entry( .replace_all(&magic.template, |caps: ®ex::Captures| { format!("{}{}", caps.get(1).unwrap().as_str(), &image_table) }); + let spec = c_colour(&spec)?; trace!("magic item {}\n\n{}\n", &item_name, &spec);