This commit is contained in:
Hackerpilot 2015-03-07 17:13:48 -08:00
parent 39bf1dafb9
commit 3743e80505
3 changed files with 15 additions and 8 deletions

View File

@ -660,16 +660,14 @@ private:
}
else
{
if (config.braceStyle == BraceStyle.otbs)
if (index > 0 && !justAddedExtraNewline && !peekBackIs(tok!"{") && !peekBackIs(tok!"}"))
{
write(" ");
write("{");
}
else
{
newline();
write("{");
if (config.braceStyle == BraceStyle.otbs)
write(" ");
else
newline();
}
write("{");
indentLevel++;
index++;
newline();

1
tests/issue0056.d Normal file
View File

@ -0,0 +1 @@
{{{}}{}}

8
tests/issue0056.d.ref Normal file
View File

@ -0,0 +1,8 @@
{
{
{
}
}
{
}
}