mirror of
https://github.com/pragma-/pbot.git
synced 2025-10-11 05:27:27 +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;
|
||||
}
|
||||
|
||||
#push @prefix_group, ' ' if $allow_whitespace;
|
||||
|
||||
my @prefixes = split //, $optional_prefix;
|
||||
my @opens = split //, $open_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;
|
||||
if ($ch eq $opens[$open_index]) {
|
||||
$match = 1;
|
||||
$open_index++;
|
||||
} else {
|
||||
if ($allow_whitespace and $ch eq ' ') {
|
||||
if ($allow_whitespace and $ch eq ' ' and not $extracting) {
|
||||
next;
|
||||
} else {
|
||||
} elsif (not $extracting) {
|
||||
$state = 'prefixgroup';
|
||||
next;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user