mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.57k stars 639 forks source link

Allow different delimiters (or document existing ability) #3

Closed irskep closed 12 years ago

irskep commented 12 years ago

I write an app that uses Python jinja2 templates and Javascript underscore.js templates. I'm interested in switching to nunjucks, but I really want my JS and Python templates to use different syntax, and it's not practical for me to convert my Python templates. I'd like to be able to configure nunjucks to use [[ instead of {{, etc.

jlongster commented 12 years ago

See if this works for you: http://nunjucks.jlongster.com/api#Customizing-Variable-and-Block-Tags

Let me know if that's not what you are looking for.

irskep commented 12 years ago

That'll do it, thanks!

agarzola commented 2 years ago

For anyone else looking for this information and coming across this issue, here’s an updated link: https://mozilla.github.io/nunjucks/api.html#customizing-syntax