wmlindent: don't begin string concatenation if the line is commented out

Fixes a bug reported by Toranks.
This commit is contained in:
Elvish_Hunter 2023-03-10 10:19:06 +01:00
parent 11fdf19e58
commit c78cc7a2b0

View file

@ -222,7 +222,7 @@ def reindent(name, infp, outfp):
# May need to indent based on the line we just saw.
if opener(transformed):
indent_level += 1
if continued_string.search(transformed):
if continued_string.search(transformed) and not (transformed.startswith("#")):
if not instring:
indent_level += 1
instring = True