From e8fc3e965db448ee562731bf82c55b1c626c7d08 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 16 Jan 2015 22:24:54 -0800 Subject: [PATCH] Improve output filtering; show line-numbers in pastes --- modules/compiler_vm/languages/tendra.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/compiler_vm/languages/tendra.pm b/modules/compiler_vm/languages/tendra.pm index aca4291d..75504b47 100755 --- a/modules/compiler_vm/languages/tendra.pm +++ b/modules/compiler_vm/languages/tendra.pm @@ -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; } }