mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Factoids: Fix typo and edge case
This commit is contained in:
parent
c95afe65bc
commit
90b23d5391
@ -750,7 +750,7 @@ sub expand_factoid_vars {
|
|||||||
my $var;
|
my $var;
|
||||||
my $extract_method;
|
my $extract_method;
|
||||||
|
|
||||||
if ($action =~ /^\{.*?\}/) {
|
if ($rest =~ /^\{.*?\}/) {
|
||||||
($var, $rest) = $self->{pbot}->{interpreter}->extract_bracketed($rest, '{', '}');
|
($var, $rest) = $self->{pbot}->{interpreter}->extract_bracketed($rest, '{', '}');
|
||||||
|
|
||||||
if ($var =~ /:/) {
|
if ($var =~ /:/) {
|
||||||
@ -847,7 +847,15 @@ sub expand_factoid_vars {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
last if $matches == 0 or $expansions == 0;
|
if ($matches == 0 or $expansions == 0) {
|
||||||
|
if (length $rest) {
|
||||||
|
$rest = $result . $rest;
|
||||||
|
$result = '';
|
||||||
|
next;
|
||||||
|
} else {
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (not length $rest) {
|
if (not length $rest) {
|
||||||
$rest = $result;
|
$rest = $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user