[TxMt] Output in new window?
Allan Odgaard
throw-away-1 at macromates.com
Fri Oct 21 03:18:11 UTC 2005
On 21/10/2005, at 2.37, Sune Foldager wrote:
>> I was wondering this as well...as currently the HTML option
>> doesn't output things correctly.
> Yes it does, in HTML whitespace is collapsed, which is how it's
> supposed to work. Use a <pre> block for pre-formated text like yours.
Starting with next build (which is not 576, which I just did) I've
added this function to bash_init.sh:
pre () {
echo -n '<pre>'
perl -pe 's/&/&/g; s/</</g; s/>/>/g'
echo '</pre>'
}
Then it's simply a matter of writing:
«command»|pre
And the output from «command» will be shown w/o whitespace collapsing
nor wrapping, and with HTML characters escaped.
More information about the textmate
mailing list