Re: Cheetah filter empty new lines

"R. Tyler Ballance" <[email protected]> Tue, 26 Jan 2010 12:48:04 -0800
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
On Tue, 26 Jan 2010, [email protected] wrote:

> is it possible to strip out empty new lines from cheetah when
> 
> #filter StripEmptyNewlines
> html...
> #end filter

You could very easily write a Cheetah.Filters.Filter subclass to do that


    class StripEmptyNewLines(Cheetah.Filters.Filter):
        def filter(self, value, **kwargs):
            # Do work here


> does anyone know a way to do this or is it part of the standard cheetah
> filter library

Nothing exists in the standard Cheetah install that does this

Cheers,
-R. Tyler Ballance
--------------------------------------
 Jabber: [email protected]
 GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
   Blog: http://unethicalblogger.com

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iEYEARECAAYFAktfVQMACgkQFCbH3D9R4W9klgCgr5cNuhAi8mvN6RUv4IWlscR2
J98An0eDfTPcNCwJS2ud/PQoHykLipP0
=VU8l
-----END PGP SIGNATURE-----