summaryrefslogtreecommitdiff
path: root/tool/auto-style.rb
diff options
context:
space:
mode:
-rwxr-xr-xtool/auto-style.rb3
1 files changed, 2 insertions, 1 deletions
@@ -233,10 +233,11 @@ edited_files = files.select do |f|
if File.fnmatch?("*.[ch]", f, File::FNM_PATHNAME) &&
!DIFFERENT_STYLE_FILES.any? {|pat| File.fnmatch?(pat, f, File::FNM_PATHNAME)}
src.gsub!(/^\w+\([^(\n)]*?\)\K[ \t]*(?=\{$)/, "\n")
src.gsub!(/^([ \t]*)\}\K[ \t]*(?=else\b)/, "\n" '\1')
src.gsub!(/^[ \t]*\}\n\K\n+(?=[ \t]*else\b)/, '')
- indent = indent0 = true
end
if trailing0 or eofnewline0 or expandtab0 or indent0