diff --git a/src/utils/batchprocessors.py b/src/utils/batchprocessors.py index 9661d23a2e..541efc49a8 100644 --- a/src/utils/batchprocessors.py +++ b/src/utils/batchprocessors.py @@ -177,7 +177,7 @@ from src.utils import utils ENCODINGS = settings.ENCODINGS CODE_INFO_HEADER = re.compile(r"\(.*?\)") -RE_INSERT = re.compile(r"^\#INSERT (.*?)", re.MULTILINE) +RE_INSERT = re.compile(r"^\#INSERT (.*)", re.MULTILINE) RE_CLEANBLOCK = re.compile(r"^\#.*?$|^\s*$", re.MULTILINE) RE_CMD_SPLIT = re.compile(r"^\#.*?$", re.MULTILINE) RE_CODE_SPLIT = re.compile(r"(^\#CODE.*?$|^\#HEADER)$", re.MULTILINE) @@ -268,7 +268,7 @@ class BatchCommandProcessor(object): def replace_insert(match): "Map replace entries" - return "\#\n".join(self.parse_file(match.group())) + return "\#\n".join(self.parse_file(match.group(1))) # insert commands from inserted files text = RE_INSERT.sub(replace_insert, text)