[Nitro] html.rb

George Moschovitis george.moschovitis at gmail.com
Wed Apr 12 12:14:23 EDT 2006


I dont think it fits in facets, I will move it into nitro, ignore this...

-g.

On 4/12/06, TRANS <transfire at gmail.com> wrote:
> 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.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list