3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

Improve output filtering; show line-numbers in pastes

This commit is contained in:
Pragmatic Software 2015-01-16 22:24:54 -08:00
parent c40fc622ff
commit e8fc3e965d

View File

@ -34,11 +34,14 @@ sub postprocess_output {
my $self = shift;
$self->SUPER::postprocess_output;
$self->{output} =~ s/^\n+//mg;
$self->{output} =~ s/^\[Warning: Directory 'c89' already defined.\]\s*//;
$self->{output} =~ s/\s*Warning: Directory 'c89' already defined.//g;
if (not exists $self->{options}->{'-paste'} or not (defined $self->{got_run} and $self->{got_run} eq 'paste')) {
if ((not exists $self->{options}->{'-paste'}) and (not defined $self->{got_run} or $self->{got_run} ne 'paste')) {
$self->{output} =~ s/"$self->{sourcefile}", line \d+:\s*//g;
$self->{output} =~ s/Error:\s+\[/Error: [/g;
$self->{output} =~ s/Warning:\s+\[/Warning: [/g;
}
}