mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #207
This commit is contained in:
parent
ebb2db9303
commit
f14c6e1226
4 changed files with 29 additions and 1 deletions
|
@ -347,7 +347,8 @@ private:
|
|||
{
|
||||
if (currentIs(tok!")") && indents.topIs(tok!","))
|
||||
indents.pop();
|
||||
else if (peekBack2Is(tok!",") && !indents.topIs(tok!","))
|
||||
else if (peekBack2Is(tok!",") && !indents.topIs(tok!",")
|
||||
&& indents.indentToMostRecent(tok!"enum") == -1)
|
||||
indents.push(tok!",");
|
||||
newline();
|
||||
}
|
||||
|
|
11
tests/allman/issue0207.d.ref
Normal file
11
tests/allman/issue0207.d.ref
Normal file
|
@ -0,0 +1,11 @@
|
|||
enum a
|
||||
{
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d,
|
||||
/* a comment */
|
||||
e,
|
||||
f,
|
||||
g
|
||||
}
|
6
tests/issue0207.d
Normal file
6
tests/issue0207.d
Normal file
|
@ -0,0 +1,6 @@
|
|||
enum a
|
||||
{
|
||||
a, b, c, d,
|
||||
/* a comment */
|
||||
e, f, g
|
||||
}
|
10
tests/otbs/issue0207.d.ref
Normal file
10
tests/otbs/issue0207.d.ref
Normal file
|
@ -0,0 +1,10 @@
|
|||
enum a {
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d,
|
||||
/* a comment */
|
||||
e,
|
||||
f,
|
||||
g
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue