mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
modules/trans.pl: use -no-ansi instead of regex
This commit is contained in:
parent
ba769dc446
commit
f426594d80
5
modules/trans.pl
vendored
5
modules/trans.pl
vendored
@ -14,11 +14,8 @@ my $args = quotemeta "@ARGV";
|
|||||||
$args =~ s/\\([ :-])/$1/g;
|
$args =~ s/\\([ :-])/$1/g;
|
||||||
$args =~ s/^\s+|\s+$//g;
|
$args =~ s/^\s+|\s+$//g;
|
||||||
|
|
||||||
my $opts = '-j';
|
my $opts = '-j -no-ansi -no-autocorrect';
|
||||||
$opts .= ' -b' unless $args =~ /^-/;
|
$opts .= ' -b' unless $args =~ /^-/;
|
||||||
|
|
||||||
my $result = `trans $opts $args`;
|
my $result = `trans $opts $args`;
|
||||||
|
|
||||||
$result =~ s/\e\[\d+m//g;
|
|
||||||
|
|
||||||
print "$result\n";
|
print "$result\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user