Yelp/cheetah — pull request #7 by eevee (2012-03-28 00:51:46+00:00)
Title: Markupsafe friendly

Miraculously, Cheetah already has a `autoAssignDummyTransactionToSelf` compiler setting that does about what I want: makes all functions write to a single transaction, rather than rendering themselves and returning their output to be re-interpolated.

I fixed this setting to work correctly with the much more recent `#call`, `#cache`, and `#capture` blocks.

Also added a `$capture` function for deliberately snagging the output of a template function when using a transaction.

Both `#call` (et al.) and `$capture` have the downside of flattening a chunk of template to a plain string and then reinterpolating into the caller (thus filtering the same content a second time), but the only "real" fix for this would be a significant breaking overhaul of how these constructs work.