pub fn extract_file_arg(args: &[Value]) -> (Vec<Value>, Option<String>)Expand description
Splits off a trailing file-path argument from args.
Returns (data_args, Some(path)) if the last argument is a string
whose value ends with .svg, .png, or equals "ascii" exactly.
Otherwise returns (args.to_vec(), None).