diff options
author | Brendan Long <self@brendanlong.com> | 2019-02-20 22:20:57 +0300 |
---|---|---|
committer | Brendan Long <self@brendanlong.com> | 2019-02-20 22:20:57 +0300 |
commit | c177d26d40562ea1a4659429180a8a262156bf64 (patch) | |
tree | 427d817432a0e02dc450dd26110a957bad0b90d9 /scripts | |
parent | 5ed1813158f1c0b33c99c80d28463b6a77a1c843 (diff) |
Don't indent empty lines in fix-indent.py
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fix-indent.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/fix-indent.py b/scripts/fix-indent.py index 10198e57..1f73187c 100755 --- a/scripts/fix-indent.py +++ b/scripts/fix-indent.py @@ -10,6 +10,10 @@ for file_name in sys.argv[1:]: indent = 0 for line in f: line = line.strip() + if not line: + o.write("\n") + continue + if line.startswith("}") or line.count(")") > line.count("("): indent -= 1 for _ in range(indent): |