diff options
-rw-r--r-- | cutl/compiler/cxx-indenter.txx | 5 | ||||
-rw-r--r-- | tests/compiler/cxx-indenter/driver.cxx | 6 | ||||
-rw-r--r-- | tests/compiler/cxx-indenter/output.std | 6 |
3 files changed, 16 insertions, 1 deletions
diff --git a/cutl/compiler/cxx-indenter.txx b/cutl/compiler/cxx-indenter.txx index 976eb3b..ab5b5a8 100644 --- a/cutl/compiler/cxx-indenter.txx +++ b/cutl/compiler/cxx-indenter.txx @@ -541,7 +541,10 @@ namespace cutl } } } - else if (token_ != rbrace_) + + // Stop buffering unless we have another closing brace. + // + if (token_ != rbrace_) { buffering_ = false; } diff --git a/tests/compiler/cxx-indenter/driver.cxx b/tests/compiler/cxx-indenter/driver.cxx index f14a6dd..180187a 100644 --- a/tests/compiler/cxx-indenter/driver.cxx +++ b/tests/compiler/cxx-indenter/driver.cxx @@ -101,4 +101,10 @@ main () << "}" << "while (false);" << endl; + + os << "{" + << "f (\"CREATE TABLE \\\"test\\\" (\"" << endl + << "\"'id',\"" << endl + << "\"'name')\");" + << "}"; } diff --git a/tests/compiler/cxx-indenter/output.std b/tests/compiler/cxx-indenter/output.std index 1a22bc7..f90f365 100644 --- a/tests/compiler/cxx-indenter/output.std +++ b/tests/compiler/cxx-indenter/output.std @@ -73,3 +73,9 @@ do } while (false); +{ + f ("CREATE TABLE \"test\" (" + "'id'," + "'name')"); +} + |