mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -663,6 +663,34 @@ i.e.::
|
||||
|
||||
{% regroup people|dictsort:"gender" by gender as grouped %}
|
||||
|
||||
spaceless
|
||||
~~~~~~~~~
|
||||
|
||||
**New in Django development version.**
|
||||
|
||||
Strips whitespace between HTML tags. This includes tab characters and newlines.
|
||||
|
||||
Example usage::
|
||||
|
||||
{% spaceless %}
|
||||
<p>
|
||||
<a href="foo/">Foo</a>
|
||||
</p>
|
||||
{% spaceless %}
|
||||
|
||||
This example would return this HTML::
|
||||
|
||||
<p><a href="foo/">Foo</a></p>
|
||||
|
||||
Only space between *tags* is stripped -- not space between tags and text. In
|
||||
this example, the space around ``Hello`` won't be stripped::
|
||||
|
||||
{% spaceless %}
|
||||
<strong>
|
||||
Hello
|
||||
</strong>
|
||||
{% spaceless %}
|
||||
|
||||
ssi
|
||||
~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user