j***@public.gmane.org
2011-01-27 15:29:37 UTC
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 59 by trevor.r...-***@public.gmane.org: A predicate containing the text 'or'
results in a template parsing error
http://code.google.com/p/json-template/issues/detail?id=59
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
Attachments:
template-3.html 1.0 KB
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 59 by trevor.r...-***@public.gmane.org: A predicate containing the text 'or'
results in a template parsing error
http://code.google.com/p/json-template/issues/detail?id=59
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
Attachments:
template-3.html 1.0 KB
--
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.
You received this message because you are subscribed to the Google Groups "JSON Template" group.
To post to this group, send email to json-template-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to json-template+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/json-template?hl=en.