mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Further fix for multi-line non-block code at the start of batchcode file
This commit is contained in:
parent
2bb0b23688
commit
ab1cd445e4
1 changed files with 4 additions and 2 deletions
|
|
@ -354,8 +354,10 @@ class BatchCodeProcessor(object):
|
|||
for imatch, match in enumerate(list(_RE_CODE_OR_HEADER.finditer(text))):
|
||||
mtype = match.group(1).strip()
|
||||
# we need to handle things differently at the start of the file
|
||||
mgroup = 3 if mtype else 2
|
||||
istart, iend = match.span(mgroup)
|
||||
if mtype:
|
||||
istart, iend = match.span(3)
|
||||
else:
|
||||
istart, iend = match.start(2), match.end(3)
|
||||
code = text[istart:iend]
|
||||
if mtype == "#HEADER":
|
||||
headers.append(code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue