0

Possible Duplicate:
Boolean checks in underscore templates

I can't use standard ERB style templates with underscore since they are being used in an express ejs file, so I changed underscore templates to use mustache style templating

_.templateSettings = {
  interpolate : /\{\{(.+?)\}\}/g
};

However it now trips over the if statements, how would I change this ERB style

<% if (something) { %>

into something that works with an alternative templating in underscore

{{ if (something) }} 

doesn't seem to work and I can't use the standard <% erb style since that conflicts with the ejs template that it's in.

Community
  • 1
  • 1
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

0 Answers0