Apparently it doesn't work like that in nunjucks. I couldn't get it to, and the docs told me to do what I did.