mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-29 06:39:55 +03:00
Fix #162
This commit is contained in:
parent
6fb035ff8b
commit
47a972693d
4 changed files with 30 additions and 0 deletions
|
@ -310,7 +310,13 @@ private:
|
||||||
write(" ");
|
write(" ");
|
||||||
}
|
}
|
||||||
else if (!currentIs(tok!"{"))
|
else if (!currentIs(tok!"{"))
|
||||||
|
{
|
||||||
|
if (currentIs(tok!")") && indents.topIs(tok!","))
|
||||||
|
indents.pop();
|
||||||
|
else if (peekBack2Is(tok!",") && !indents.topIs(tok!","))
|
||||||
|
indents.push(tok!",");
|
||||||
newline();
|
newline();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
newline();
|
newline();
|
||||||
|
|
8
tests/allman/issue0162.d.ref
Normal file
8
tests/allman/issue0162.d.ref
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
void foo(int foobarbazqux1, /* */
|
||||||
|
int foobarbazqux2, /* */
|
||||||
|
int foobarbazqux3, /* */
|
||||||
|
int foobarbazqux4, /* */
|
||||||
|
int foobarbazqux5, /* */
|
||||||
|
int foobarbazqux6, /* */
|
||||||
|
int foobarbazqux7 /* */
|
||||||
|
);
|
8
tests/issue0162.d
Normal file
8
tests/issue0162.d
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
void foo(int foobarbazqux1, /* */
|
||||||
|
int foobarbazqux2, /* */
|
||||||
|
int foobarbazqux3, /* */
|
||||||
|
int foobarbazqux4, /* */
|
||||||
|
int foobarbazqux5, /* */
|
||||||
|
int foobarbazqux6, /* */
|
||||||
|
int foobarbazqux7 /* */
|
||||||
|
);
|
8
tests/otbs/issue0162.d.ref
Normal file
8
tests/otbs/issue0162.d.ref
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
void foo(int foobarbazqux1, /* */
|
||||||
|
int foobarbazqux2, /* */
|
||||||
|
int foobarbazqux3, /* */
|
||||||
|
int foobarbazqux4, /* */
|
||||||
|
int foobarbazqux5, /* */
|
||||||
|
int foobarbazqux6, /* */
|
||||||
|
int foobarbazqux7 /* */
|
||||||
|
);
|
Loading…
Add table
Add a link
Reference in a new issue