[TxMt] Bug: Python bundle - constant_placeholder definition does not handle '%%'

Allan Odgaard throw-away-1 at macromates.com
Mon Oct 2 17:42:31 UTC 2006


On 2/10/2006, at 13:25, Andrew Durdin wrote:

> The 'constant_placeholder' definition incorrectly matches the '%s' in
> a literal string '%%s' and highlights it; it should match the '%%'.
>
> Fix: in the constant_placeholder definition, change:
>    match = '%(\([a-zA-Z_]+\))?(0|\-|\+)?([0-9\.]*)?[diuoxXfeEgGsrc]';
> to:
>    match = '%(\([a-zA-Z_]+\))?(0|\-|\+)?([0-9\.]*)?[diuoxXfeEgGsrc%]';

Thanks, I changed it to:

     match = '%(%|(\([a-zA-Z_]+\))?(0|\-|\+)?([0-9\.]*)? 
[diuoxXfeEgGsrc])';

This assuming that %% itself is special, and does not support the  
normal modifier flags/values/etc. that normal percent-sequences do.




More information about the textmate mailing list