[TxMt] Re: switching from page with puts to HTML

Allan Odgaard mailinglist at textmate.org
Thu Jul 9 18:29:21 UTC 2009


On 4 Jul 2009, at 17:52, Matt Neuburg wrote:

> [...]
> Solved this in a hacky way by interposing an object that masquerades  
> as
> $stdout and intercepts and modifies output before passing it along  
> to the
> real stdout. But I'm hoping someone will tell me there's already a  
> simpler
> built-in way to do this in TextMate.

There is not, and it’s not really possible to do since e.g. your HTML  
header/footer does not need this escaping, only your body does, so TM  
wouldn’t know when to filter.

>> Oh, and while we're up: is there a way I can detect whether we are  
>> currently
>> set to Create New Document or Show As HTML? I'd like to funnel all my
>> commands thru this one bottleneck but NOT do all that stuff if we  
>> are set to
>> Create New Document (in that case I just want to pass the output thru
>> untouched).

There is no API to obtain this info, sry.




More information about the textmate mailing list