You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was messing around with the new delimiters option released in 2.0.0-beta.1 and found out that setting { and } as start and end delimiters respectively, breaks in some cases.
constdot=require('dot')consttmpl=dot.template('{?merchant}/{=merchant}{?}/{=version}/{=product}',{argName: ['merchant','version','product'],delimiters: {start: '{',end: '}'},})tmpl({product: 'cookie',version: '1.0.0',merchant: '243'})🐛// Could not create a template function: let out='';if(merchant)';out+='/'+(merchant);out+='out+='/'+(version)+'/'+(product);return out;Uncaught SyntaxError: Unexpectedidentifier
If I don't use conditionals in my template string, the rendering works fine.
I was messing around with the new
delimiters
option released in2.0.0-beta.1
and found out that setting{
and}
asstart
andend
delimiters respectively, breaks in some cases.If I don't use conditionals in my template string, the rendering works fine.
Other delimiters that I've tried, such as
[
and]
, seem to work fine in all scenarios, though.The text was updated successfully, but these errors were encountered: