This fixes issue #578

This commit is contained in:
Duarte Cordeiro 2014-09-15 15:15:46 +01:00
parent 6799106333
commit 394ef28212

View file

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