diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-10-07 10:27:11 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-10-07 11:27:29 +0200 |
commit | d0c0a12b5ed5e1f95c705e2d055180c8a492f078 (patch) | |
tree | f940667bbe6ce99586c932b6bc7129a9cff9933d /crawl-ref/source/util/checkwhite | |
parent | 59fab6d7b9c09ce9b461310891e08446c2520834 (diff) | |
download | crawl-ref-d0c0a12b5ed5e1f95c705e2d055180c8a492f078.tar.gz crawl-ref-d0c0a12b5ed5e1f95c705e2d055180c8a492f078.zip |
Make tab expansion a bit smarter.
It will now properly handle tabs after spaces -- but not tabs after other
characters yet.
Also restore the width to standard 8 -- Galehar, it was accidentally changed
while you changed the newlines away from \r\n, right? All terminals, git
and most editors default to 8, and in many cases you can't even change that,
tabs that are not 8 by default happen only in some Windows editor.
Or is there some need for a debate?
Diffstat (limited to 'crawl-ref/source/util/checkwhite')
-rwxr-xr-x | crawl-ref/source/util/checkwhite | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/util/checkwhite b/crawl-ref/source/util/checkwhite index 69b3a3aa8c..5bb4448b2f 100755 --- a/crawl-ref/source/util/checkwhite +++ b/crawl-ref/source/util/checkwhite @@ -21,7 +21,7 @@ while(<FLIST>) $_.="\n", print "missing newline at eof: $file\n" unless /\n$/s; print "extra newlines at eof: $file\n" if s/\n+\n$/\n/s; - print "tab: $file\n" if s/\t/ /sg; + print "tab: $file\n" if s/ {0,7}\t/ /sg; print "spaces at eol: $file\n" if s/ +\n/\n/sg; if ($_ ne $cont) |