Stop wmlindent from using commented-out #enddefs.
This commit is contained in:
parent
82a4ece230
commit
25c977c651
1 changed files with 2 additions and 2 deletions
|
@ -159,8 +159,8 @@ def reindent(name, infp, outfp):
|
|||
saved_indent = indent
|
||||
indent = wmltools.baseindent
|
||||
inmacro = True
|
||||
# Be sure to ignore the newlines
|
||||
elif transformed.rstrip().endswith("#enddef"):
|
||||
# Be sure to ignore the newlines and comments
|
||||
elif transformed.rstrip().endswith("#enddef") and transformed.find("#") == transformed.find("#enddef"):
|
||||
indent = saved_indent
|
||||
inmacro = False
|
||||
elif not inmacro and transformed[0] in ('[', ']'):
|
||||
|
|
Loading…
Add table
Reference in a new issue