Hey, great library.
I had a problem where a project had used underscore _.templateSettings to change the default behavior.
Problem is that in your library you do your templates based on the default settings, so if someone overrides it, it wont work.
A minor improvement would be for this library to specify its template settings directly.
_.template(templateString, [data], [settings])
Just create an obj with the default settings
{
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
}
(I already fixed in my project by using the solution above, to not interfere with your library, but a library shouldnt depend on that to work)
Hey, great library.
I had a problem where a project had used underscore _.templateSettings to change the default behavior.
Problem is that in your library you do your templates based on the default settings, so if someone overrides it, it wont work.
A minor improvement would be for this library to specify its template settings directly.
_.template(templateString, [data], [settings])
Just create an obj with the default settings
{
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
}
(I already fixed in my project by using the solution above, to not interfere with your library, but a library shouldnt depend on that to work)