Re: Cheetah filter empty new lines

[email protected] Wed, 27 Jan 2010 02:47:30 -0800
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
tavis i m using webpy
thanks

On Tue, Jan 26, 2010 at 5:01 PM, Tavis Rudd <[email protected]> wrote:

> Mark,
> If you're using a wsgi server you could also handle that in middleware with
> regex replacements or with lxml.
>
> Also remember the #slurp directive if you only need to do remove a newline
> or two from a short section of a template
> Tavis
>
>
> On Tue, 26 Jan 2010, R. Tyler Ballance wrote:
>
>
>> 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
>>
>>
>>


-- 
Bidegg worlds best auction site
http://bidegg.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