Remove trailing whitespace from submissions
This commit is contained in:
parent
151407a001
commit
b99d1449c9
|
@ -3495,6 +3495,7 @@ def actionsubmit(data, actionmode=0, force_submit=False, force_prompt_gen=False,
|
|||
if(not vars.gamestarted):
|
||||
vars.submission = data
|
||||
execute_inmod()
|
||||
vars.submission = re.sub(r"[^\S\r\n]*([\r\n]*)$", r"\1", vars.submission) # Remove trailing whitespace, excluding newlines
|
||||
data = vars.submission
|
||||
if(not force_submit and len(data.strip()) == 0):
|
||||
assert False
|
||||
|
@ -3553,6 +3554,7 @@ def actionsubmit(data, actionmode=0, force_submit=False, force_prompt_gen=False,
|
|||
data = applyinputformatting(data)
|
||||
vars.submission = data
|
||||
execute_inmod()
|
||||
vars.submission = re.sub(r"[^\S\r\n]*([\r\n]*)$", r"\1", vars.submission) # Remove trailing whitespace, excluding newlines
|
||||
data = vars.submission
|
||||
# Dont append submission if it's a blank/continue action
|
||||
if(data != ""):
|
||||
|
|
Loading…
Reference in New Issue