-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I was looking for a crate just like this, but I had to look at the code to see if works when replaced text contains other replacement.
Can be added a test case like this:
#[test]
fn test_hashmap_replacement_skip_nested() {
let mut table = HashMap::new();
table.insert("placeholder", "{{crazy}}");
table.insert("crazy", "{{placeholder}}");
assert_eq!(
Template::new("hello {{placeholder}} world of {{crazy}}").fill_with_hashmap(&table),
"hello {{crazy}} world of {{placeholder}}"
);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels