fabpot/Twig — Issue #561: Strange {% spaceless %} and {% collapse %} suggestion
Author: mrxotey
Created: 2011-12-19 10:30:32+00:00
State: open

Hallo Fabien,

sorry for my terrible english.

I'm not sure that it's issue, but it's a bit strange for me
code:

```jinja
{% spaceless %}

Hallo Fabien

{% endspaceless %}
```

expected:

```html

Hallo Fabien

```

got:

```html

HalloFabien

```

Of course I can use &#x20; instead of space between </em> and <strong>
But I belive {% spaceless %} tag should not remove spaceses between inline HTML tags.

Also I suggest {% collapse %} tag:

```jinja
{% collapse %}
{{ some_thing }}

here is some content

div

pre1

{% for i in arr %}...{% endfor %}
...
{% endcollapse %}
```

Above code should work like this:

```jinja
{{ some_thing }} {{-''-}}

{{-''-}}
here is some content {{-''-}}

div

{{-''-}}

{{-''-}}
pre1 {{-''-}}

{{-''-}}

{{-''-}}
{% for i in arr %}...{% endfor %} {{-''-}}
... {{-''-}}
```

or that:

```jinja
{{ some_thing }}

here is some content

div

pre1

{% for i in arr %}...{% endfor %}...
```

Or simply {% spaceless %} should not affects on any value that can be returned from {{ ... }}

Best regards,
Grigoriy