mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #98
This commit is contained in:
parent
2410311022
commit
65ae9dd4a0
3 changed files with 17 additions and 2 deletions
|
@ -1024,8 +1024,9 @@ private:
|
|||
while (indents.length && isWrapIndent(indents.top))
|
||||
indents.pop();
|
||||
indents.push(tok!"{");
|
||||
if (index == 1 || peekBackIs(tok!":") || peekBackIs(tok!"{")
|
||||
|| peekBackIs(tok!"}") || peekBackIs(tok!")") || peekBackIs(tok!";"))
|
||||
if (index == 1 || peekBackIs(tok!":", true) || peekBackIs(tok!"{", true)
|
||||
|| peekBackIs(tok!"}", true) || peekBackIs(tok!")", true)
|
||||
|| peekBackIs(tok!";", true))
|
||||
{
|
||||
indentLevel = indents.indentSize - 1;
|
||||
}
|
||||
|
|
7
tests/issue0098.d
Normal file
7
tests/issue0098.d
Normal file
|
@ -0,0 +1,7 @@
|
|||
unittest
|
||||
{
|
||||
if (!fdmatch)
|
||||
goto Lfd; // comment
|
||||
{
|
||||
}
|
||||
}
|
7
tests/issue0098.d.ref
Normal file
7
tests/issue0098.d.ref
Normal file
|
@ -0,0 +1,7 @@
|
|||
unittest
|
||||
{
|
||||
if (!fdmatch)
|
||||
goto Lfd; // comment
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue