3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-22 18:52:40 +01:00

pbot-vm: preserve newlines in split_line()

This commit is contained in:
Pragmatic Software 2024-11-02 18:29:25 -07:00
parent 02a0d8ecfb
commit bd4fd4ea27
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 2 additions and 3 deletions

View File

@ -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 {

View File

@ -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",
};