shawnbot / meta-template

:sparkles: Automagically convert Nunjucks templates into a variety of other formats!
52 stars 9 forks source link

Allow aliasing of filter names in ERB format #10

Closed dsingleton closed 7 years ago

dsingleton commented 7 years ago

Some of the builtin Nunjucks filters exist in a ERB (well, Rails) context, but with a different name.

Add a way to alias the filter names, only doing safe => raw for now, as that's what we're needing at the moment - and is closer to a template language level construct than a filter imo.

This duplicates some similar behaviour in the liquid templates. I didn't want to generalise quite yet, but could be built on in the future.