Fix #enddef detection in wmlindent.

This commit is contained in:
Alexander van Gessel 2008-12-03 12:24:22 +01:00
parent 5c2aa1cd25
commit 10bc9e8733

View file

@ -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 ('[', ']'):