]> granicus.if.org Git - clang/commit
clang-format: [JS] Improve formatting of function literals in chains
authorDaniel Jasper <djasper@google.com>
Mon, 29 Sep 2014 07:54:54 +0000 (07:54 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 29 Sep 2014 07:54:54 +0000 (07:54 +0000)
commit3c23474695dab018d83656b68f8048ffda5c3d48
treee89ca01ddab8105f6689302cf4b6bc094a59442e
parentdff837f3c811c64c04ef0359ce53621bc9fc01c0
clang-format: [JS] Improve formatting of function literals in chains

Before:
  getSomeLongPromise(.....)
      .then(
           function(value) {
             body();
             body();
           })
      .thenCatch(function(error) {
    body();
    body();
  });

After:
  getSomeLongPromise(.....)
      .then(function(value) {
        body();
        body();
      })
      .thenCatch(function(error) {
        body();
        body();
      });

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218595 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestJS.cpp