Template function call parsing is too strict

Bug #247670 reported by Andrew Trusty
2
Affects Status Importance Assigned to Milestone
web.py
Fix Released
Medium
Anand Chitipothu

Bug Description

I've attached a diff of some changes that I made to the current dev branch to implement less strict function call parsing in templates. I was having problems making my function calls in my templates work when I didn't have the correct spacing between commas, equals, and other comparison operators.

In the current version only a call with spacing such as the following will parse:

foo(a, b=1, c=2 + 3)

My patch allows the following variations to now parse correctly by specifically allowing for 1 space or no spaces around the comma, equals, and the non-word operators:

foo(a,b =1,c= 2+3)
foo(a, b = 1,c=2+ 3)

Revision history for this message
Andrew Trusty (andrewtrusty) wrote :
Aaron Swartz (aaronsw)
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Anand Chitipothu (anandology) wrote : Re: [Bug 247670] [NEW] Template function call parsing is too strict

This has already been fixed in the new template implementation.

checkout web.py development version.

bzr get http://webpy.org/bzr/webpy.dev

Revision history for this message
Anand Chitipothu (anandology) wrote :

This has been fixed in the new implementation of templetor.

Changed in webpy:
milestone: none → 0.3
status: Confirmed → Fix Committed
Changed in webpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.