My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 59: A predicate containing the text 'or' results in a template parsing error
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by trevor.r...@gmail.com, Jan 27, 2011
What steps will reproduce the problem?
1. Create a template with a predicate named 'before?'
2. Expand the template with the additional option more_predicates
3.

What is the expected output? What do you see instead?

Expected the value of the but a Template Syntax Error was thrown with the following message 'Got too many {end} statements'.

What version of the product are you using? On what operating system?

JS version, Windows XP Professional, Internet Explorer 8

Please provide any additional information below.

Fix seems to be to change the definition of the regular expression to

var _OR_RE = /^or(?:\s+(.+))?/;

I suspect the issue also impacts other regular expressions but have not tested
template-3.html
1.0 KB   View   Download

Powered by Google Project Hosting