mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-17 09:29:30 +01:00
pbot-vm: preserve newlines in split_line()
This commit is contained in:
parent
02a0d8ecfb
commit
bd4fd4ea27
@ -55,7 +55,6 @@ sub split_line ($line, %opts) {
|
||||
|
||||
$ch = $chars[$i++];
|
||||
|
||||
my $dquote = $quote // 'undef';
|
||||
$spaces = 0 if $ch ne ' ';
|
||||
|
||||
if ($escaped) {
|
||||
@ -101,7 +100,7 @@ sub split_line ($line, %opts) {
|
||||
}
|
||||
|
||||
if ($ch eq ' ') {
|
||||
if (++$spaces > 1 and $opts{keep_spaces}) {
|
||||
if ($opts{keep_spaces} && (++$spaces > 1 || $ch eq "\n")) {
|
||||
$token .= $ch;
|
||||
next;
|
||||
} else {
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4825,
|
||||
BUILD_REVISION => 4826,
|
||||
BUILD_DATE => "2024-11-02",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user