mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #89
This commit is contained in:
parent
b07ecacb91
commit
66342a99ee
3 changed files with 13 additions and 1 deletions
|
@ -474,7 +474,7 @@ private:
|
|||
case tok!";":
|
||||
if (peekIs(tok!"else") && ifIndents.length)
|
||||
tempIndent = ifIndents.top();
|
||||
else if (!peekIs(tok!"}"))
|
||||
else if (!peekIs(tok!"}") || peekIs(tok!"comment", false))
|
||||
{
|
||||
if (ifIndents.length)
|
||||
{
|
||||
|
|
6
tests/issue0089.d
Normal file
6
tests/issue0089.d
Normal file
|
@ -0,0 +1,6 @@
|
|||
unittest
|
||||
{
|
||||
if (x)
|
||||
doSomething();
|
||||
//doSomethingElse();
|
||||
}
|
6
tests/issue0089.d.ref
Normal file
6
tests/issue0089.d.ref
Normal file
|
@ -0,0 +1,6 @@
|
|||
unittest
|
||||
{
|
||||
if (x)
|
||||
doSomething();
|
||||
//doSomethingElse();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue