mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 10:09:49 +00:00
Fix #enddef detection in wmlindent.
This commit is contained in:
parent
5c2aa1cd25
commit
10bc9e8733
@ -159,7 +159,8 @@ def reindent(name, infp, outfp):
|
||||
saved_indent = indent
|
||||
indent = wmltools.baseindent
|
||||
inmacro = True
|
||||
elif transformed.endswith("#enddef"):
|
||||
# Be sure to ignore the newlines
|
||||
elif transformed.rstrip().endswith("#enddef"):
|
||||
indent = saved_indent
|
||||
inmacro = False
|
||||
elif not inmacro and transformed[0] in ('[', ']'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user