Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A predicate containing the text 'or' results in a template parsing error #59

Open
GoogleCodeExporter opened this issue Aug 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Original issue reported on code.google.com by trevor.r...@gmail.com on 27 Jan 2011 at 3:29

Attachments:

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

No branches or pull requests

1 participant