projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix regex parse in sh/dx, add DXBearing::distance
[spider.git]
/
cmd
/
show
/
dx.pl
diff --git
a/cmd/show/dx.pl
b/cmd/show/dx.pl
index c0c43fa35c50b866a5f865aeca22dfa7109f32cf..655630ce798b24baee204c2899230095b2db3b90 100644
(file)
--- a/
cmd/show/dx.pl
+++ b/
cmd/show/dx.pl
@@
-11,10
+11,20
@@
sub handle
{
my ($self, $line) = @_;
{
my ($self, $line) = @_;
+ # disguise regexes
+ $line =~ s/\{(.*)\}/'{'. unpack('H*', $1) . '}'/eg;
+ dbg("sh/dx disguise any regex: '$line'") if isdbg('sh/dx');
+
+ # now space out brackets and !
$line =~ s/([\(\!\)])/ $1 /g;
my @list = split /[\s]+/, $line; # split the line up
$line =~ s/([\(\!\)])/ $1 /g;
my @list = split /[\s]+/, $line; # split the line up
+ # put back the regexes
+ @list = map { my $l = $_; $l =~ s/\{([0-9a-fA-F]+)\}/'{' . pack('H*', $1) . '}'/eg; $l } @list;
+
+ dbg("sh/dx after regex return: " . join(' ', @list)) if isdbg('sh/dx');
+
my @out;
my $f;
my $call = $self->call;
my @out;
my $f;
my $call = $self->call;