mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-30 07:09:58 +03:00
Fix #69
This commit is contained in:
parent
9b6fbfda20
commit
41dc8ef9e9
3 changed files with 21 additions and 1 deletions
|
@ -1088,7 +1088,7 @@ private:
|
||||||
}
|
}
|
||||||
else if ((!assumeSorted(astInformation.attributeDeclarationLines)
|
else if ((!assumeSorted(astInformation.attributeDeclarationLines)
|
||||||
.equalRange(current.line).empty) || (currentIs(tok!"identifier")
|
.equalRange(current.line).empty) || (currentIs(tok!"identifier")
|
||||||
&& peekIs(tok!":") && !isBlockHeader(2)))
|
&& peekIs(tok!":") && (!isBlockHeader(2) || peek2Is(tok!"if"))))
|
||||||
{
|
{
|
||||||
tempIndent--;
|
tempIndent--;
|
||||||
}
|
}
|
||||||
|
|
10
tests/issue0069.d
Normal file
10
tests/issue0069.d
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
L1:
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
tests/issue0069.d.ref
Normal file
10
tests/issue0069.d.ref
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
L1:
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue