mirror of
https://github.com/pragma-/pbot.git
synced 2025-10-11 21:47:24 +02:00
Interpreter: extract_bracketed: fix indentation, minor tweaks
This commit is contained in:
parent
d9c2c55efc
commit
fcb4404012
@ -346,8 +346,6 @@ sub extract_bracketed {
|
|||||||
@prefix_group = split //, $1;
|
@prefix_group = split //, $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#push @prefix_group, ' ' if $allow_whitespace;
|
|
||||||
|
|
||||||
my @prefixes = split //, $optional_prefix;
|
my @prefixes = split //, $optional_prefix;
|
||||||
my @opens = split //, $open_bracket;
|
my @opens = split //, $open_bracket;
|
||||||
my @closes = split //, $close_bracket;
|
my @closes = split //, $close_bracket;
|
||||||
@ -476,15 +474,15 @@ sub extract_bracketed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($state eq 'openbracket' and $prefix_group_match and $prefix_match) {
|
if ($extracting or ($state eq 'openbracket' and $prefix_group_match and $prefix_match)) {
|
||||||
$prefix_index = 0;
|
$prefix_index = 0;
|
||||||
if ($ch eq $opens[$open_index]) {
|
if ($ch eq $opens[$open_index]) {
|
||||||
$match = 1;
|
$match = 1;
|
||||||
$open_index++;
|
$open_index++;
|
||||||
} else {
|
} else {
|
||||||
if ($allow_whitespace and $ch eq ' ') {
|
if ($allow_whitespace and $ch eq ' ' and not $extracting) {
|
||||||
next;
|
next;
|
||||||
} else {
|
} elsif (not $extracting) {
|
||||||
$state = 'prefixgroup';
|
$state = 'prefixgroup';
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user