Unexpected whitespace/newline insertion before elements with tal:repeat
Bug #229931 reported by
Eleanor Berger
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.tal |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Contrary to the documentation, and to the expectation of users, elements with tal:repeat render with a newline and whitespace if they are the first non-whitespace test on their line in the template.
This is is not only confusing, but also makes it difficult to implement loops where there shouldn't be any whitespace between the repeated elements.
See also a discussion of the problem here: http://
If I recall correctly, this was done so that generated HTML "looked
right" when viewed as source. I don't know the source of this
requirement.