Ensure leading_whitespace is actually space

This commit is contained in:
Paul Gauthier 2023-06-10 06:16:22 -07:00
parent 8d408e1fc4
commit 806805c0b1

View file

@ -77,7 +77,7 @@ def replace_part_with_missing_leading_whitespace(whole, part, replace):
leading_whitespace = whole_lines[i][:j]
break
if not leading_whitespace:
if not leading_whitespace or not all(c.isspace() for c in leading_whitespace):
continue
matched = all(