From 2a9e5e7f8144dd2b924c81cc39241d753f66879f Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Fri, 24 Feb 2017 22:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=8E=E9=85=B7=20Q=20?= =?UTF-8?q?=E6=94=B6=E5=88=B0=E7=9A=84=E6=B6=88=E6=81=AF=E7=9A=84=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E9=97=AE=E9=A2=98=EF=BC=88=E6=AD=A3=E7=A1=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=20\r\n=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/scheduler.py b/commands/scheduler.py index 81aec65f..6f48e6ed 100644 --- a/commands/scheduler.py +++ b/commands/scheduler.py @@ -28,7 +28,7 @@ _scheduler = BackgroundScheduler( _command_args_start_flags = get_command_args_start_flags() -_args_split_sep = '[ \n\t]' +_args_split_sep = ' |\r?\n|\t' _job_id_suffix_start = '@' @@ -152,7 +152,7 @@ def add_job(args_text, ctx_msg, internal=False): job_id = job_id_without_suffix + _job_id_suffix_start + get_target(ctx_msg) command_list = [] if multi: - command_raw_list = command_raw.split('\n') + command_raw_list = re.split('\r?\n', command_raw) for cmd_raw in command_raw_list: cmd_raw = cmd_raw.lstrip() if not cmd_raw: