Guard against a crash bug.
This commit is contained in:
parent
7d9ab5d882
commit
91f7f93b06
1 changed files with 2 additions and 2 deletions
|
@ -2009,10 +2009,10 @@ if __name__ == '__main__':
|
|||
# Handle SingleUnitWML or Standard Unit Filter or SideWML
|
||||
# Also, when macro calls have description= in them, the arg is
|
||||
# a SUF being passed in.
|
||||
if (under("unit") and not "units" in filename) or \
|
||||
if tagstack and ((under("unit") and not "units" in filename) or \
|
||||
standard_unit_filter() or \
|
||||
under("side") or \
|
||||
re.search("{[A-Z]+.*description=.*}", line):
|
||||
re.search("{[A-Z]+.*description=.*}", line)):
|
||||
if "id" not in tagstack[-1][1] and "_" not in line:
|
||||
line = re.sub(r"\bdescription\s*=", "id=", line)
|
||||
if "name" not in tagstack[-1][1]:
|
||||
|
|
Loading…
Add table
Reference in a new issue