Custom delimiters broken #153

AlexeyUzhva opened this Issue Aug 23, 2012 · 8 comments


None yet
4 participants

{{ and }} are reserved in Django. So I'm trying to change it into {? and ?}

This code works on older jsrender versions but not on current one


BorisMoore commented Aug 23, 2012

Yes, that looks like a bug I noticed recently and which should be fixed in an upcoming update I am working on. It's a major update, so may be a few days before I am able to commit it...

Thank you for so fast response!

So I'm looking forward for this release and staying with old version for now:)

Niels-R commented Sep 7, 2012

Any idea which is the last version where the custom delimiters aren't broken?

I'm using jsRender in my MVC templates which already use the {{ }} delimiters for server-side rendering.

I'm currently using a very old version where {{for ...}} is still {{#each ...}} and integers with value 0 are rendered as empty strings...


BorisMoore commented Sep 8, 2012

You probably have to go back at least to this.
The error was likely introduced here (May 25th)

@BorisMoore BorisMoore added a commit that referenced this issue Dec 3, 2012

@BorisMoore BorisMoore Commit counter 22. Major update, including some BREAKING CHANGES, and…
… many

new features. More samples and documentation for new features will be added
incrementally in coming updates.

Among the changes:

Detailed APIs modified for consistent arguments and use of this
pointer, and for maximum extensibility. See updated samples for usage...

Compiled templates restructured for easier debugging.

View object restructured for clarity.

View now has a type property, e.g. type="item"
Only "item" views have index properties, but to get the index from a nested
view use view.get("item").index.

nodes collection on a view is now a function, view.nodes().

Settings grouped onto a $.views.settings object.
View navigation features improved, with view.get(...) and $.view(elem, ...)
tagCtx object provides improved access to the args and properties of a tag

Adding resources (helpers, converters, tags, etc) to a template now supported
by passing parent template to API. e.g. $.tags({...}, parentTemplate).
Many improvements to custom tags, - used also as part of JsViews integration
for new JsViews Tag Controls. (Instantiation of tags as control instances).

Template inclusion now supported with simpler syntax {{for tmpl=.../))

Fixes for issues #169, #162, #157, #156, #155, #153, #145

BorisMoore commented Dec 3, 2012

This has been fixed in commit 22. Please reopen if the fix does not work for you. Thanks!

BorisMoore closed this Dec 3, 2012

I'm using django too.The delimiter ''{{'',"{%" are reserved characters in django.How can I replace them with "<<","<%" in the current version? I read JsRender API,but I still don't how to customize the delimiters, not to customize tags.


BorisMoore commented Jul 16, 2013


There's an example in the unit tests:

For example:


I got it.Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment