BorisMoore/jsrender — Issue #23: $.views.setDelimiters bug...
Author: kktos
Created: 2011-11-12 17:33:09+00:00
State: open

Hi Boris,

just noticed that if I set the delimiters with 2 different characters, like for example "<%" and "%>", it doesn't work.

the problem is probably located on line 170-171
---
setDelimiters: function( openTag, closeTag ) {
// Set or modify the delimiter characters for tags: "{{" and "}}"
var firstCloseChar = closeTag.charAt( 1 ),
secondCloseChar = closeTag.charAt( 0 );
openTag = "\\" + openTag.charAt( 0 ) + "\\" + openTag.charAt( 1 );
closeTag = "\\" + firstCloseChar + "\\" + secondCloseChar;
---
I presume you wished to type:
var firstCloseChar = closeTag.charAt( 0 ),
secondCloseChar = closeTag.charAt( 1 );

with this little fix, it works.