#2594: Template system should handle whitespace better
----------------------------------------------------------+-----------------
Reporter: Gary Wilson <[email protected]> | Owner:
jshedd
Status: new | Milestone:
Component: Template system | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 1 | Needs_tests: 0
Needs_better_patch: 1 |
----------------------------------------------------------+-----------------
Comment (by steveire):
I wrote some more tests for this and it turned out that the presence of a
tag would strip out all whitespace occurring before it, not just one line.
I don't know if that was intentional, but I thought it surprising.
Another thing I noticed is that trailing whitespace is not stripped. I
don't know how relevant that is, but I mimiced that behavior in this
patch.
BEFORE PATCH:
kde-de...@bishop:~/Random/djtbenchmarks$ python -m timeit -n 50 -s "from
bm import my_render" "my_render()"
50 loops, best of 3: 3.29 msec per loop
AFTER PATCH:
kde-de...@bishop:~/Random/djtbenchmarks$ python -m timeit -n 50 -s "from
bm import my_render" "my_render()"
50 loops, best of 3: 3.51 msec per loop
--
Ticket URL: <http://code.djangoproject.com/ticket/2594#comment:24>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.