#4446: spaceless fails under specific condition of subtemplate
-------------------------+--------------------------------------------------
   Reporter:  shwag < >  |                Owner:  adrian         
     Status:  new        |            Component:  Template system
    Version:  SVN        |           Resolution:                 
   Keywords:             |                Stage:  Unreviewed     
  Has_patch:  0          |           Needs_docs:  0              
Needs_tests:  0          |   Needs_better_patch:  0              
-------------------------+--------------------------------------------------
Old description:

> {{{
> the {% spaceless %} filter is not filtering out carriage returns in sub-
> templates under certain conditions.
> 
> {% spaceless %}
> {% include "something.html" %}
> {% endspaceless %}
> 
> and in something.html
> {% if test  %}
> {% load humanize %}
> <a name="thing"></a>
> 
> 
> will leave one carriage return for each block tag.
> A valid work around is.
> 
> <a name="thing"></a>
> {% if test  %}
> {% load humanize %}
> 
> Once valid html is before the tags, the carriage returns are no longer
> generated.
> }}}

New description:

 The {% spaceless %} filter is not filtering out carriage returns in sub-
 templates under certain conditions.
 {{{
 {% spaceless %}
 {% include "something.html" %}
 {% endspaceless %}
 }}}
 and in something.html
 {{{
 {% if test  %}
 {% load humanize %}
 <a name="thing"></a>
 }}}
 
 will leave one carriage return for each block tag.
 A valid work around is.
 {{{
 <a name="thing"></a>
 {% if test  %}
 {% load humanize %}
 }}}
 Once valid html is before the tags, the carriage returns are no longer
 generated.

Comment (by mtredinnick):

 Fixed description formatting so that non-code sentences wrap.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4446#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---

Reply via email to