Edgewall Software

Opened 16 years ago

Last modified 8 years ago

#270 new defect

Line break missing after each element in py:for loop

Reported by: catherine.devlin@… Owned by: cmlenz
Priority: major Milestone: 0.9
Component: General Version: 0.5.1
Keywords: Cc:

Description

When for-looping on an element, Genshi is omitting the line break after each closing tag. For example, from the example at http://genshi.edgewall.org/wiki/Documentation/templates.html

<ul>

<li py:for="fruit in fruits">

I like ${fruit}s

</li>

</ul>

is producing

<ul>

<li>

I like apples

</li><li>

I like oranges

</li><li>

I like kiwis

</li>

</ul>

It's functional, but ugly. To match the template's appearance, it should produce

<ul>

<li>

I like apples

</li> <li>

I like oranges

</li> <li>

I like kiwis

</li>

</ul>

This applies to the development version, 0.5, 0.5.1, and maybe older.

Could be related to http://genshi.edgewall.org/ticket/110 - not sure.

I'll attach a file with two failing doctests.

Attachments (2)

genshiTest.py (1.6 KB) - added by catherine.devlin@… 16 years ago.
two doctests for expected spacing
for-dir-newline.patch (839 bytes) - added by Carsten Klein <carsten.klein@…> 15 years ago.
Initial version of a patch for this feature

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by catherine.devlin@…

two doctests for expected spacing

comment:1 Changed 15 years ago by cmlenz

  • Milestone changed from 0.6 to 0.7

Changed 15 years ago by Carsten Klein <carsten.klein@…>

Initial version of a patch for this feature

comment:2 Changed 8 years ago by hodgestar

  • Milestone changed from 0.7 to 0.9

Moved to milestone 0.9.

Note: See TracTickets for help on using tickets.