mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Interpreter: extract_bracketed/split_line now properly handle a final trailing backslash
This commit is contained in:
parent
1270bef010
commit
ca228b9e06
@ -386,6 +386,7 @@ sub extract_bracketed {
|
|||||||
$result = '';
|
$result = '';
|
||||||
} else {
|
} else {
|
||||||
# add final token and exit
|
# add final token and exit
|
||||||
|
$token .= '\\' if $escaped;
|
||||||
$rest .= $token if $extracted;
|
$rest .= $token if $extracted;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
@ -535,6 +536,7 @@ sub split_line {
|
|||||||
$token = $last_token;
|
$token = $last_token;
|
||||||
} else {
|
} else {
|
||||||
# add final token and exit
|
# add final token and exit
|
||||||
|
$token .= '\\' if $escaped;
|
||||||
push @args, $token if length $token;
|
push @args, $token if length $token;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user