[Twisted-Python] Woven-generated html needs newlines and whitespace

Donovan Preston dp at twistedmatrix.com
Sun Jun 8 11:09:19 MDT 2003


On Friday, June 6, 2003, at 06:42 PM, Adrian van den Dries wrote:

> quoth screwtape at froup.com:
>
>> In a perfect world, I'd have block HTML elements on their own lines,
>> and inline HTML elements, well, inline. But since Woven spits out XML
>> rather than HTML, that'd be quite hacky to implement. :)
>
> Why would it be hacky?  HTML is naturally semantic, so it would be
> appropriate for twisted.web.woven.widgets to have a registry of
> elements and their default block display properties.  Woven could then
> have an option to "pretty-format" the output according to the display
> properties.

Woven widgets don't have anything to do with the display of the final 
html; they just manipulate the DOM. microdom is wholly responsible for 
turning this tree of objects into a string of characters.

However, this doesn't mean microdom can't do the same thing -- put 
inline HTML elements inline. Thanks for the idea, I'll implement it 
asap!

Donovan





More information about the Twisted-Python mailing list