Development

Changeset 1846

You must first sign up to be able to contribute.

Changeset 1846

Show
Ignore:
Timestamp:
08/25/06 14:35:26 (2 years ago)
Author:
fabien
Message:

added error color when Phing output a PHP error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/pake/trunk/lib/pake/tasks/pakePhingTask.class.php

    r1843 r1846  
    6161  public static function colorize($text) 
    6262  { 
    63     return preg_replace(array('#(\[.+?\])#e', '#(\+ [^ ]+)#e'), array('pakeColor::colorize("$1", "INFO")', 'pakeColor::colorize("$1", "INFO")'), $text); 
     63    return preg_replace(array( 
     64      '#\[(.+?)\]#', 
     65      '#{{PHP Error}}#e', 
     66      '#({{.+?}})#e', 
     67      '#(\+ [^ ]+)#e', 
     68      '#{{(.+?)}}#', 
     69    ), array( 
     70      '{{$1}}', 
     71      'pakeColor::colorize("(PHP Error)", "ERROR")', 
     72      'pakeColor::colorize("$1", "INFO")', 
     73      'pakeColor::colorize("$1", "INFO")', 
     74      '[$1]', 
     75    ), $text); 
    6476  } 
    6577}