handbar 0.0.4

Fork of Handlebars.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::PathAndJson;

mod error;
mod error_if;

pub use error::ERROR_HELPER;
pub use error_if::ERROR_IF_HELPER;
pub use error_if::ERROR_UNLESS_HELPER;

pub fn render_fmt_message<'rc>(mut mess: String, args: &[PathAndJson<'rc>]) -> String {
    for arg in args {
        mess = mess.replace("{}", &arg.value().clone().to_string());
    }

    mess
}