sunng87 / handlebars-rust

Rust templating with Handlebars
MIT License
1.26k stars 137 forks source link

number comparison functions only accept integer values #672

Closed lovasoa closed 1 week ago

lovasoa commented 1 week ago

Hi !

Currently, number comparison functions only accept integer values:

https://github.com/sunng87/handlebars-rust/blob/ecef974fa1c9a445adea85e7cdf6f918e284429c/src/helpers/helper_extras.rs#L8-L11

It would be nice if they could compare any Json value with any other, or at least any number with any other.

initially reported in https://github.com/lovasoa/SQLpage/issues/573

sunng87 commented 1 week ago

Sounds reasonable. I will look into this soon. Thank you!

lovasoa commented 1 week ago

@sunng87 : I opened a PR

sunng87 commented 1 week ago

released in 6.1.0