[Nitro] html.rb

TRANS transfire at gmail.com
Wed Apr 12 11:50:02 EDT 2006


On 4/12/06, Andrew Thompson <vagabond at cataclysm-software.net> wrote:
> TRANS wrote:
> > Hey, what's this do exactly?
> >
> >   module Glue
> >   module Html
> >     def self.cleanup(buf)
> >       out = buf.dup
> >       elements = "input|img|br|hr|link|style|render|include|inject|base|meta"
> >       out.gsub! /<textarea ([^>]*)><\/textarea>/, '<textarea \1>#{}</textarea>'
> >       out.gsub! /<(#{elements}) ([^>]*)><\/\1>/, '<\1 \2 />'
> >       out.gsub! /<(#{elements})><\/\1>/, '<\1 />'
> >       out
> >     end
> >   end
> >   end
>
> Manveru and I deciphered this for our compiler pipeline dealie. what it
> does is it converts empty tags like <tag></tag> to <tag/> and <tag
> foo="bar"></tag> to <tag foo="bar"/>. As far as I recall it does nothing
> to a textview, but it does nothing in an expensive fashion.

Okay, cool. Thanks.

So now I'm wondering where that fits in Facets......

T.




More information about the Nitro-general mailing list