Keats / tera

A template engine for Rust based on Jinja2/Django
http://keats.github.io/tera/
MIT License
3.48k stars 281 forks source link

Add a simple merge filter #900

Open Raymi306 opened 8 months ago

Raymi306 commented 8 months ago

For issue #774, although I suspect I am not quite meeting all of the goals set forth here.

With v2 coming up, I'm not sure if this is wanted right now. I also suspect I could make it fancier and take a list of objects and merge all of them somehow.

Anyway, feel free to discard this, at the very least it is helping me get used to reading and writing Rust again after writing Python all day at work.

Keats commented 7 months ago

Yeah let's not add new things to v1. I'm wrondering whether we can make some array/dict operations built in the language rather than going through a file, eg obj1 ~ obj2 for merging, like we do for string concatenation.