#2594: template system should handle whitespace better
-------------------------------------------------+--------------------------
 Reporter:  Gary Wilson <[EMAIL PROTECTED]>  |       Owner:  adrian
     Type:  defect                               |      Status:  new   
 Priority:  normal                               |   Milestone:        
Component:  Template system                      |     Version:  SVN   
 Severity:  normal                               |    Keywords:        
-------------------------------------------------+--------------------------
 So, I think that the template system should not leave blank lines
 behind if the tag(s) on that line evaulated to the empty string.  To
 make sure we are all on the same page, here is an example:
 
 This template code:
 {{{
 <h1>My list</h1>
 
 <ul>
 {% for item in items %}
     <li>{{ item }}</li>
 {% endfor %}
 </ul>
 }}}
 
 Would normally evaluate to:
 {{{
 <h1>My list</h1>
 
 <ul>
 
     <li>item 1</li>
 
     <li>item 2</li>
 
     <li>item 3</li>
 
 </ul>
 }}}
 
 And with the {% spaceless %} tag evaluates to:
 {{{
 <h1>My list</h1> <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li>
 </ul>
 }}}
 
 And with the StripWhitespaceMiddleware evaluates to
 {{{
 <h1>My list</h1>
 <ul>
     <li>item 1</li>
     <li>item 2</li>
     <li>item 3</li>
 </ul>
 }}}
 
 But what I think should evaluate to:
 {{{
 <h1>My list</h1>
 
 <ul>
     <li>item 1</li>
     <li>item 2</li>
     <li>item 3</li>
 </ul>
 }}}
 
 In other words, leave lines that I add, but remove the empty lines that
 had template tags on them.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2594>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to