hasezoey/new_string_template

Rendering variables with no space in between fails

simanacci opened this issue ยท 2 comments

Expected Result
The file size should not exceed 25MB

let foo = "The file should not exceed {size}{unit}".to_owned();
let templ = new_string_template::template::Template::new(foo);
let data = {
    let mut map = HashMap::new();
    map.insert("size", "25");
    map.insert("unit", "MB");
    map
};
let rendered = templ
    .render(&data)
    .expect("Expected Profile photo Size Warning Result to be Ok");
TemplateError { kind: MissingData, error: "Missing Data for Argument \"size}{unit\"" }',

Thanks for reporting, i think i may have used greedy regexes

๐ŸŽ‰ This issue has been resolved in version 1.3.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€