mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #225
This commit is contained in:
parent
e2d23726b9
commit
0eea53a628
4 changed files with 20 additions and 0 deletions
|
@ -898,6 +898,12 @@ private:
|
|||
indents.push(tok!"else");
|
||||
newline();
|
||||
}
|
||||
else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if"))
|
||||
{
|
||||
indents.pop();
|
||||
indents.pop();
|
||||
indents.push(tok!"else");
|
||||
}
|
||||
}
|
||||
|
||||
void formatKeyword()
|
||||
|
|
5
tests/allman/issue0225.d.ref
Normal file
5
tests/allman/issue0225.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
static if (condition)
|
||||
int declaration;
|
||||
else
|
||||
{
|
||||
}
|
5
tests/issue0225.d
Normal file
5
tests/issue0225.d
Normal file
|
@ -0,0 +1,5 @@
|
|||
static if (condition)
|
||||
int declaration;
|
||||
else
|
||||
{
|
||||
}
|
4
tests/otbs/issue0225.d.ref
Normal file
4
tests/otbs/issue0225.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
|||
static if (condition)
|
||||
int declaration;
|
||||
else {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue