#15798: "spaceless" filter does not not honor <pre> tag formatting
-------------------------------------+-------------------------------------
               Reporter:  dfcode     |          Owner:  nobody
                   Type:             |         Status:  closed
  Cleanup/optimization               |      Component:  Template system
              Milestone:             |       Severity:  Normal
                Version:  1.3        |       Keywords:  spaceless,html,pre
             Resolution:  wontfix    |      Has patch:  0
           Triage Stage:             |    Needs tests:  0
  Unreviewed                         |  Easy pickings:  0
    Needs documentation:  0          |
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * easy:   => 0
 * needs_docs:   => 0
 * resolution:   => wontfix


Comment:

 Currently the {% spaceless %} tag does what is documented: it removes all
 spaces.

 #8123 discusses customizing its behavior for certain tags (inline vs.
 block); it was rejected by two core developers. The bottom line is that if
 you do not want to remove all spaces, you just shouldn't use {% spaceless
 %}.

 In my opinion, the behavior is intentional, so I will close the ticket as
 wontfix.

 PS1 : your idea was briefly mentioned here:
 http://code.djangoproject.com/ticket/3532#comment:10 but not discussed
 further.

 PS2 : for the record, here is the history of the {% spaceless %} tag:
 - introduced with #1067, really spaceless
 - changed with #1227, collapses several whitespace characters to a space
 - changed back with #3532, really spaceless again after a discussion on
 the mailing-list: http://www.mail-archive.com/django-
 develop...@googlegroups.com/msg09235.html

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15798#comment:1>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to