Fix formatting issue
This commit is contained in:
parent
e8a6b40432
commit
cac45e3607
|
@ -288,10 +288,8 @@ private:
|
||||||
case conditional_newline:
|
case conditional_newline:
|
||||||
immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]);
|
immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]);
|
||||||
if (l > config.dfmt_soft_max_line_length)
|
if (l > config.dfmt_soft_max_line_length)
|
||||||
{
|
|
||||||
newline();
|
newline();
|
||||||
}
|
else if (peekBackIs(tok!")"))
|
||||||
else
|
|
||||||
write(" ");
|
write(" ");
|
||||||
break;
|
break;
|
||||||
case always_newline:
|
case always_newline:
|
||||||
|
@ -304,7 +302,7 @@ private:
|
||||||
pushWrapIndent(tok!"!");
|
pushWrapIndent(tok!"!");
|
||||||
newline();
|
newline();
|
||||||
}
|
}
|
||||||
else
|
else if (peekBackIs(tok!")"))
|
||||||
write(" ");
|
write(" ");
|
||||||
break;
|
break;
|
||||||
case always_newline_indent:
|
case always_newline_indent:
|
||||||
|
@ -542,7 +540,7 @@ private:
|
||||||
write(" ");
|
write(" ");
|
||||||
}
|
}
|
||||||
else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens
|
else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens
|
||||||
&& !peekIs(tok!"in") && !peekIs(tok!"is"))
|
&& !peekIs(tok!"in") && !peekIs(tok!"is") && !peekIs(tok!"if"))
|
||||||
{
|
{
|
||||||
writeToken();
|
writeToken();
|
||||||
write(" ");
|
write(" ");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar))
|
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
|
||||||
|
if (is(T : Bar))
|
||||||
{
|
{
|
||||||
void foo()
|
void foo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar)) {
|
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
|
||||||
|
if (is(T : Bar)) {
|
||||||
void foo() {
|
void foo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue