From 5835a84e20ef4cf1f82bd015e4e9bf03ea19dfad Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 24 Aug 2016 23:49:24 +0200 Subject: [PATCH] Fixed unittests. --- evennia/commands/default/batchprocess.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evennia/commands/default/batchprocess.py b/evennia/commands/default/batchprocess.py index d9aa7f2232..583ac6e8c3 100644 --- a/evennia/commands/default/batchprocess.py +++ b/evennia/commands/default/batchprocess.py @@ -93,9 +93,10 @@ def format_header(caller, entry): """ width = _HEADER_WIDTH - 10 # strip all comments for the header - entry = _RE_CODE_START.split(entry, 1)[1] - entry = _RE_COMMENT.sub("", entry).strip() - + if caller.ndb.batch_batchmode != "batch_commands": + # only do cleanup for batchcode + entry = _RE_CODE_START.split(entry, 1)[1] + entry = _RE_COMMENT.sub("", entry).strip() header = utils.crop(entry, width=width) ptr = caller.ndb.batch_stackptr + 1 stacklen = len(caller.ndb.batch_stack)